From 6f348338736b4f7c4386e4034f78ad8286417965 Mon Sep 17 00:00:00 2001 From: "jan.reininghaus" Date: Tue, 7 May 2013 13:35:16 +0000 Subject: updated CMakeLists.txt for Visual Studio git-svn-id: https://phat.googlecode.com/svn/trunk@65 8e3bb3c2-eed4-f18f-5264-0b6c94e6926d --- CMakeLists.txt | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 77d2a91..bd6ffe8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,7 @@ set (CMAKE_REQUIRED_FLAGS ${OpenMP_CXX_FLAGS}) CHECK_CXX_SOURCE_COMPILES(" #include int main() { -#if (_OPENMP >= 200805) +#if (_OPENMP >= 200805 || _MSC_VER >= 1500) return 0; #else breaks_on_purpose @@ -22,6 +22,8 @@ int main() { if(OPENMP_VERSION) + + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}") else() @@ -34,8 +36,20 @@ To use a different compiler, pass it to cmake in the variable CMAKE_CXX_COMPILER ") endif() - -add_executable (simple_example src/simple_example.cpp) -add_executable (self_test src/self_test.cpp) -add_executable (phat src/phat.cpp) -add_executable (benchmark src/benchmark.cpp) + +FILE(GLOB_RECURSE all_headers "include/phat/*.h") + +FILE(GLOB general_includes "include/phat/*.h") +FILE(GLOB algorithms_includes "include/phat/*.h") +FILE(GLOB helpers_includes "include/phat/*.h") +FILE(GLOB representations_includes "include/phat/*.h") + +add_executable (simple_example src/simple_example.cpp ${all_headers}) +add_executable (self_test src/self_test.cpp ${all_headers}) +add_executable (phat src/phat.cpp ${all_headers}) +add_executable (benchmark src/benchmark.cpp ${all_headers}) + +source_group(Header\ Files FILES ${general_includes}) +source_group(Header\ Files\\helpers FILES ${helpers_includes}) +source_group(Header\ Files\\representations FILES ${representations_includes}) +source_group(Header\ Files\\algorithms FILES ${algorithms_includes}) -- cgit v1.2.3