@@ -52,17 +52,19 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
52
52
SET (RELEASE_FLAGS "${OPTIMIZED} ${STRIP_SYMBOLS} " )
53
53
54
54
if (GENERATOR_IS_MULTI_CONFIG )
55
- set (CMAKE_CONFIGURATION_TYPES "Profile;Debug;DRelease;Release" CACHE STRING "" FORCE )
55
+ set (CMAKE_CONFIGURATION_TYPES "Profile;Debug;DRelease;Release;None " CACHE STRING "" FORCE )
56
56
string (APPEND COMPILE_FLAGS "$<$<CONFIG:Profile>:${PROFILE_FLAGS} > $<$<CONFIG:Debug>:${DEBUG_FLAGS} > $<$<CONFIG:DRelease>:${DRELEASE_FLAGS} > $<$<CONFIG:Release>:${RELEASE_FLAGS} >" )
57
57
else ()
58
58
set_property (CACHE PM_BUILD_TYPE PROPERTY HELPSTRING "Choose the type of build" )
59
- set_property (CACHE PM_BUILD_TYPE PROPERTY STRINGS "Profile;Debug;DRelease;Release" )
59
+ set_property (CACHE PM_BUILD_TYPE PROPERTY STRINGS "Profile;Debug;DRelease;Release;None " )
60
60
if (PM_BUILD_TYPE STREQUAL "Profile" )
61
61
list (APPEND COMPILE_FLAGS "${PROFILE_FLAGS} " )
62
62
elseif (PM_BUILD_TYPE STREQUAL "Debug" )
63
63
list (APPEND COMPILE_FLAGS "${DEBUG_FLAGS} " )
64
64
elseif (PM_BUILD_TYPE STREQUAL "DRelease" )
65
65
list (APPEND COMPILE_FLAGS "${DRELEASE_FLAGS} " )
66
+ elseif (PM_BUILD_TYPE STREQUAL "None" )
67
+ message ("PM_BUILD_TYPE is None. Not compiling." )
66
68
else () #Release build
67
69
message ("PM_BUILD_TYPE not detected or invalid value, defaulting to Release build." )
68
70
set (PM_BUILD_TYPE Release CACHE STRING "" FORCE )
@@ -72,33 +74,37 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
72
74
list (JOIN COMPILE_FLAGS " " COMPILE_FLAGS )
73
75
endif ()
74
76
75
- SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILE_FLAGS} " )
76
-
77
- set (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR} /cmake/modules )
78
- if (APPLE )
79
- find_package (Python 3.8 COMPONENTS Interpreter Development REQUIRED )
80
- find_package (SpiderMonkey REQUIRED )
81
- set (PYTHON_MAJOR $ENV{Python_VERSION_MAJOR} )
82
- set (PYTHON_MINOR $ENV{Python_VERSION_MINOR} )
83
- set (PYTHONLIBS_VERSION_STRING ${Python_VERSION} )
84
- set (PYTHON_INCLUDE_DIR ${Python_INCLUDE_DIRS} )
85
- set (PYTHON_LIBRARIES ${Python_LIBRARIES} )
86
- elseif (UNIX )
87
- find_package (Python 3.8 COMPONENTS Interpreter Development REQUIRED )
88
- set (Python_FIND_VIRTUALENV FIRST ) # (require cmake >= v3.15 and this is the default) use the Python version configured by pyenv if available
89
- set (PYTHON_LIBRARIES ${Python_LIBRARIES} )
90
- set (PYTHON_INCLUDE_DIR ${Python_INCLUDE_DIRS} )
91
- find_package (SpiderMonkey REQUIRED )
92
- elseif (WIN32 )
93
- find_package (Python 3.8 COMPONENTS Interpreter Development REQUIRED )
94
- set (Python_FIND_VIRTUALENV FIRST ) # (require cmake >= v3.15 and this is the default) use the Python version configured by pyenv if available
95
- set (PYTHON_LIBRARIES ${Python_LIBRARIES} )
96
- set (PYTHON_INCLUDE_DIR ${Python_INCLUDE_DIRS} )
97
- find_package (SpiderMonkey REQUIRED )
98
- endif ()
99
- message ("${CMAKE_SYSTEM_NAME} - Using Python:${Python_VERSION} - Libraries:${Python_LIBRARIES} - IncludeDirs: ${Python_INCLUDE_DIRS} " )
100
- include_directories (${Python_INCLUDE_DIRS} )
101
- include_directories (${SPIDERMONKEY_INCLUDE_DIR} )
77
+ if (NOT PM_BUILD_TYPE STREQUAL "None" )
78
+ SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILE_FLAGS} " )
79
+
80
+ set (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR} /cmake/modules )
81
+ if (APPLE )
82
+ find_package (Python 3.8 COMPONENTS Interpreter Development REQUIRED )
83
+ find_package (SpiderMonkey REQUIRED )
84
+ set (PYTHON_MAJOR $ENV{Python_VERSION_MAJOR} )
85
+ set (PYTHON_MINOR $ENV{Python_VERSION_MINOR} )
86
+ set (PYTHONLIBS_VERSION_STRING ${Python_VERSION} )
87
+ set (PYTHON_INCLUDE_DIR ${Python_INCLUDE_DIRS} )
88
+ set (PYTHON_LIBRARIES ${Python_LIBRARIES} )
89
+ elseif (UNIX )
90
+ find_package (Python 3.8 COMPONENTS Interpreter Development REQUIRED )
91
+ set (Python_FIND_VIRTUALENV FIRST ) # (require cmake >= v3.15 and this is the default) use the Python version configured by pyenv if available
92
+ set (PYTHON_LIBRARIES ${Python_LIBRARIES} )
93
+ set (PYTHON_INCLUDE_DIR ${Python_INCLUDE_DIRS} )
94
+ find_package (SpiderMonkey REQUIRED )
95
+ elseif (WIN32 )
96
+ find_package (Python 3.8 COMPONENTS Interpreter Development REQUIRED )
97
+ set (Python_FIND_VIRTUALENV FIRST ) # (require cmake >= v3.15 and this is the default) use the Python version configured by pyenv if available
98
+ set (PYTHON_LIBRARIES ${Python_LIBRARIES} )
99
+ set (PYTHON_INCLUDE_DIR ${Python_INCLUDE_DIRS} )
100
+ find_package (SpiderMonkey REQUIRED )
101
+ endif ()
102
+ message ("${CMAKE_SYSTEM_NAME} - Using Python:${Python_VERSION} - Libraries:${Python_LIBRARIES} - IncludeDirs: ${Python_INCLUDE_DIRS} " )
103
+ include_directories (${Python_INCLUDE_DIRS} )
104
+ include_directories (${SPIDERMONKEY_INCLUDE_DIR} )
105
+ # Add compiled folder directories
106
+ add_subdirectory (src )
107
+ endif (NOT PM_BUILD_TYPE STREQUAL "None" )
102
108
103
109
# Add doxygen if this is the main app
104
110
option (BUILD_DOCS "Build documentation" OFF )
@@ -112,6 +118,3 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
112
118
endif ()
113
119
114
120
endif ()
115
-
116
- # Add compiled folder directories
117
- add_subdirectory (src )
0 commit comments