CMake/Modules/CMakeDefaultMakeRuleVariabl...

102 lines
3.2 KiB
CMake
Raw Normal View History

2002-10-24 00:53:53 +04:00
# this file contains rule variables that tell cmake how to
# do things like build a .o file, create a shared or static library
#
2002-10-25 22:08:17 +04:00
# this file defines the following rule variables
# CMAKE_CXX_CREATE_SHARED_LIBRARY
# CMAKE_CXX_CREATE_SHARED_MODULE
# CMAKE_C_CREATE_SHARED_LIBRARY
# CMAKE_C_CREATE_SHARED_MODULE
# CMAKE_CXX_CREATE_STATIC_LIBRARY
# CMAKE_C_CREATE_STATIC_LIBRARY
# CMAKE_CXX_COMPILE_OBJECT
# CMAKE_C_COMPILE_OBJECT
# CMAKE_C_LINK_EXECUTABLE
# CMAKE_CXX_LINK_EXECUTABLE
# variables supplied by the generator at use time
# <TARGET>
# <TARGET_BASE> the target without the suffix
2002-10-25 22:08:17 +04:00
# <OBJECTS>
# <OBJECT>
# <LINK_LIBRARIES>
# <FLAGS>
# <LINK_FLAGS>
2002-10-25 22:08:17 +04:00
# CXX compiler information
# <CMAKE_CXX_COMPILER>
# <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS>
2002-10-25 22:08:17 +04:00
# <CMAKE_CXX_SHARED_MODULE_CREATE_FLAGS>
# <CMAKE_CXX_LINK_FLAGS>
2002-10-25 22:08:17 +04:00
# C compiler information
# <CMAKE_C_COMPILER>
# <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS>
# <CMAKE_SHARED_MODULE_CREATE_C_FLAGS>
# <CMAKE_C_LINK_FLAGS>
2002-10-25 22:08:17 +04:00
# Static library tools
# <CMAKE_AR>
# <CMAKE_RANLIB>
# create a shared C++ library
2002-10-24 00:53:53 +04:00
IF(NOT CMAKE_CXX_CREATE_SHARED_LIBRARY)
SET(CMAKE_CXX_CREATE_SHARED_LIBRARY
2002-11-21 16:45:45 +03:00
"<CMAKE_CXX_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
2002-10-24 00:53:53 +04:00
ENDIF(NOT CMAKE_CXX_CREATE_SHARED_LIBRARY)
2002-10-25 22:08:17 +04:00
# create a c++ shared module copy the shared library rule by default
2002-10-24 00:53:53 +04:00
IF(NOT CMAKE_CXX_CREATE_SHARED_MODULE)
2002-10-25 22:08:17 +04:00
SET(CMAKE_CXX_CREATE_SHARED_MODULE ${CMAKE_CXX_CREATE_SHARED_LIBRARY})
2002-10-24 00:53:53 +04:00
ENDIF(NOT CMAKE_CXX_CREATE_SHARED_MODULE)
# create a C shared library
IF(NOT CMAKE_C_CREATE_SHARED_LIBRARY)
SET(CMAKE_C_CREATE_SHARED_LIBRARY
2002-11-21 16:45:45 +03:00
"<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
2002-10-24 00:53:53 +04:00
ENDIF(NOT CMAKE_C_CREATE_SHARED_LIBRARY)
2002-10-25 22:08:17 +04:00
# create a C shared module just copy the shared library rule
2002-10-24 00:53:53 +04:00
IF(NOT CMAKE_C_CREATE_SHARED_MODULE)
2002-10-25 22:08:17 +04:00
SET(CMAKE_C_CREATE_SHARED_MODULE ${CMAKE_C_CREATE_SHARED_LIBRARY})
2002-10-24 00:53:53 +04:00
ENDIF(NOT CMAKE_C_CREATE_SHARED_MODULE)
# create a C++ static library
IF(NOT CMAKE_CXX_CREATE_STATIC_LIBRARY)
SET(CMAKE_CXX_CREATE_STATIC_LIBRARY
2002-10-25 22:08:17 +04:00
"<CMAKE_AR> cr <TARGET> <OBJECTS> "
"<CMAKE_RANLIB> <TARGET> ")
2002-10-24 00:53:53 +04:00
ENDIF(NOT CMAKE_CXX_CREATE_STATIC_LIBRARY)
# create a C static library
IF(NOT CMAKE_C_CREATE_STATIC_LIBRARY)
SET(CMAKE_C_CREATE_STATIC_LIBRARY
2002-10-25 22:08:17 +04:00
"<CMAKE_AR> cr <TARGET> <OBJECTS> "
"<CMAKE_RANLIB> <TARGET> ")
2002-10-24 00:53:53 +04:00
ENDIF(NOT CMAKE_C_CREATE_STATIC_LIBRARY)
# compile a C++ file into an object file
IF(NOT CMAKE_CXX_COMPILE_OBJECT)
SET(CMAKE_CXX_COMPILE_OBJECT
"<CMAKE_CXX_COMPILER> -o <OBJECT> <FLAGS> -c <SOURCE>")
2002-10-24 00:53:53 +04:00
ENDIF(NOT CMAKE_CXX_COMPILE_OBJECT)
# compile a C file into an object file
IF(NOT CMAKE_C_COMPILE_OBJECT)
SET(CMAKE_C_COMPILE_OBJECT
"<CMAKE_C_COMPILER> -o <OBJECT> <FLAGS> -c <SOURCE>")
2002-10-24 00:53:53 +04:00
ENDIF(NOT CMAKE_C_COMPILE_OBJECT)
IF(NOT CMAKE_C_LINK_EXECUTABLE)
SET(CMAKE_C_LINK_EXECUTABLE
"<CMAKE_C_COMPILER> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
2002-10-24 00:53:53 +04:00
ENDIF(NOT CMAKE_C_LINK_EXECUTABLE)
IF(NOT CMAKE_CXX_LINK_EXECUTABLE)
SET(CMAKE_CXX_LINK_EXECUTABLE
"<CMAKE_CXX_COMPILER> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
2002-10-24 00:53:53 +04:00
ENDIF(NOT CMAKE_CXX_LINK_EXECUTABLE)