-
Notifications
You must be signed in to change notification settings - Fork 0
/
ETISSConfig.cmake.in
54 lines (49 loc) · 2.4 KB
/
ETISSConfig.cmake.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#
# Copyright (c) 2014 Institute for Electronic Design Automation, TU Munich
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
#
# Author: Marc Greim <[email protected]>
#
set(ETISS_INCLUDE_DIRS "@CMAKE_INSTALL_PREFIX@/include" "@ETISS_SUB_INCLUDE_DIRS@")
if(NOT @ETISS_SOURCE_INSTALL@)
set(ETISS_LIBRARIES "@CMAKE_INSTALL_PREFIX@/lib/@CMAKE_SHARED_LIBRARY_PREFIX@ETISS@CMAKE_SHARED_LIBRARY_SUFFIX@")
endif()
if (NOT ETISS_DISABLE_COMPILERFLAGS)
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" ETISS_USE_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" ETISS_USE_CXX0X)
if(ETISS_USE_CXX11)
set(C_ETISS_USE_CXX11 1)
set(C_ETISS_USE_CXX0X 1)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
message("ETISS added the -std=c++11 option to CMAKE_CXX_FLAGS. this can be disabled by setting ETISS_DISABLE_COMPILERFLAGS to ON")
elseif(ETISS_USE_CXX0X)
set(C_ETISS_USE_CXX11 0)
set(C_ETISS_USE_CXX0X 1)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
message("ETISS added the -std=c++0x option to CMAKE_CXX_FLAGS. this can be disabled by setting ETISS_DISABLE_COMPILERFLAGS to ON")
else()
set(C_ETISS_USE_CXX11 0)
set(C_ETISS_USE_CXX0X 0)
message(WARNING "The compiler ${CMAKE_CXX_COMPILER} doesn't support the --std==c++11 / --std=c++0x otions. ETISS requires at least C++0x as implemented by gcc 4.6. Please ensure that the compiler is up to the task.")
endif()
endif()
file(GLOB_RECURSE SUBPROJECTS_CMAKE "@CMAKE_INSTALL_PREFIX@/cmake/*.cmake")
string(REGEX REPLACE "[^;]ETISSConfig.cmake;?" "" SUBPROJECTS_CMAKE "${SUBPROJECTS_CMAKE}")
string(REGEX REPLACE "[^;]*ConfigVersion.cmake;?" "" SUBPROJECTS_CMAKE "${SUBPROJECTS_CMAKE}")
foreach(sp ${SUBPROJECTS_CMAKE})
include(${sp})
endforeach(sp ${SUBPROJECTS_CMAKE})
set(ETISS_SOURCES ${ETISS_SOURCES} "@ETISS_SOURCES_RN@")
set(ETISS_LIBRARIES ${ETISS_LIBRARIES} "@ETISS_FILES_LNK@")