cmake_minimum_required(VERSION 3.10) # project name project(Example2 VERSION 1.0) add_executable(Example2 main.cpp util.cpp) # This is a header file will pass the version number to # the program. configure_file(Example2_Config.h.in Example2_Config.h) # Example2_Config.h header will will be created in the # build directory (and not the source directory). Note that # the build directory is not included in the include-files-paths # by default. Therefore, we include the build directory path # in the include-files-paths. target_include_directories(Example2 PUBLIC ${PROJECT_BINARY_DIR}) # specify the c++ standard set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED True)