diff options
author | jan.reininghaus <jan.reininghaus@8e3bb3c2-eed4-f18f-5264-0b6c94e6926d> | 2013-05-07 13:35:16 +0000 |
---|---|---|
committer | jan.reininghaus <jan.reininghaus@8e3bb3c2-eed4-f18f-5264-0b6c94e6926d> | 2013-05-07 13:35:16 +0000 |
commit | 6f348338736b4f7c4386e4034f78ad8286417965 (patch) | |
tree | 386546297c83dee4b06897039fe2e70e46e7312a /CMakeLists.txt | |
parent | 322afe9b792924247a3697c89e940f543479043c (diff) |
updated CMakeLists.txt for Visual Studio
git-svn-id: https://phat.googlecode.com/svn/trunk@65 8e3bb3c2-eed4-f18f-5264-0b6c94e6926d
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 26 |
1 files 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 <omp.h> 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}) |