Author: mordante
Date: Sat Mar 5 22:17:36 2011
New Revision: 48770
URL: http://svn.gna.org/viewcvs/wesnoth?rev=48770&view=rev
Log:
Add OpenMP support to cmake.
Modified:
trunk/CMakeLists.txt
Modified: trunk/CMakeLists.txt
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/CMakeLists.txt?rev=48770&r1=48769&r2=48770&view=diff
==============================================================================
--- trunk/CMakeLists.txt (original)
+++ trunk/CMakeLists.txt Sat Mar 5 22:17:36 2011
@@ -71,6 +71,7 @@
option(ENABLE_NLS "Enable building of translations" ON)
option(ENABLE_POOL_ALLOC "Enable custom pool malloc" OFF)
option(ENABLE_LOW_MEM "Reduce memory usage by removing extra functionality"
OFF)
+option(ENABLE_OMP "Enables OpenMP, and has additional dependencies" OFF)
if(UNIX AND NOT APPLE AND NOT CYGWIN)
option(ENABLE_DESKTOP_ENTRY "enable installation of desktop entry
files" ON)
@@ -167,6 +168,12 @@
if(ENABLE_LOW_MEM)
add_definitions(-DLOW_MEM)
endif(ENABLE_LOW_MEM)
+
+if(ENABLE_OMP)
+ find_package(OpenMP REQUIRED)
+ set(CMAKE_C_FLAGS "${OpenMP_C_FLAGS} ${CMAKE_C_FLAGS}")
+ set(CMAKE_CXX_FLAGS "${OpenMP_CXX_FLAGS} ${CMAKE_C_FLAGS}")
+endif(ENABLE_OMP)
if(ENABLE_DEBUG_WINDOW_LAYOUT)
add_definitions(-DDEBUG_WINDOW_LAYOUT_GRAPHS)
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits