Skip to content

Instantly share code, notes, and snippets.

@gabikat
Last active August 4, 2021 22:18
Show Gist options
  • Save gabikat/ebd2c4b280319921c053e19de12a6777 to your computer and use it in GitHub Desktop.
Save gabikat/ebd2c4b280319921c053e19de12a6777 to your computer and use it in GitHub Desktop.
Example of a simple CMakeLists.txt file for remote development
cmake_minimum_required(VERSION 3.10.2)
project(nt_analyzer)
set(CMAKE_CXX_STANDARD 14)
#add_executable(nt_analyzer nta_1a.cpp)
#target_compile_options(nt_analyzer PRIVATE -O3 -DINFILE=\"../input1a\" -DAPI=\"/usr/bin/nta1a\")
#add_executable(nt_analyzer nta_2a.cpp)
#target_compile_options(nt_analyzer PRIVATE -O2 -DINFILE=\"../input2a\" -DAPI=\"/usr/bin/nta2a\" -DMODE=\"concise\")
################################################################
## MULTITHREADED VERSION
################################################################
add_executable(nt_analyzer multithread.cpp)
# for 2b:
#add_executable(nt_analyzer nta_2b.cpp)
#target_compile_options(nt_analyzer PRIVATE -O2 -DINFILE=\"../input2b\" -DAPI=\"/usr/bin/nta2b\" -DMODE=\"concise\")
#for 1a:
find_package (Threads REQUIRED)
target_link_libraries(nt_analyzer
${CMAKE_THREAD_LIBS_INIT}
)
target_compile_options(nt_analyzer PRIVATE -O2 -DINFILE=\"../input1a\" -DAPI=\"/usr/bin/nta1a\" -DMODE=\"timing\")
# for 1b:
#target_compile_options(nt_analyzer PRIVATE -O2 -DINFILE=\"../input1b\" -DAPI=\"/usr/bin/nta1b\" -DMODE=\"timing\")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment