# bin file output # you can also set others set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
# include file path include_directories(${PROJECT_SOURCE_DIR}/include)
# your source files # you can also use # set(SRC_LIST ./src/main.cpp ./src/util.cpp ./src/nums.cpp) aux_source_directory(src SRC_LIST)
if(UNIX) MESSAGE("\nThis is Linux.\n") # you can set some config here. # add_compile_options(-std=c++17 -Wall) elseif(WIN32) MESSAGE("This is Windows.") endif()
# compile_options # for your gcc/g++ add_compile_options(-std=c++17 -O2 -lpthread -Wall)
# add the executable add_executable(test-cmake ${SRC_LIST})