Commit 692ba48c authored by Bill Hoffman's avatar Bill Hoffman

ENH: major changes to support addition of languages from cmake modules directory.

parent 59718575
......@@ -15,3 +15,11 @@ IF(CMAKE_COMPILER_IS_MINGW)
ENDIF(CMAKE_COMPILER_IS_MINGW)
SET(CMAKE_COMPILER_IS_GNUCC_RUN 1)
SET(CMAKE_C_SOURCE_FILE_EXTENSIONS c)
SET(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
SET(CMAKE_C_LINKER_PREFERENCE None)
IF(UNIX)
SET(CMAKE_C_OUTPUT_EXTENSION .o)
ELSE(UNIX)
SET(CMAKE_C_OUTPUT_EXTENSION .obj)
ENDIF(UNIX)
......@@ -21,9 +21,6 @@ ENDIF(NOT CMAKE_MODULE_EXISTS)
SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS_ENV_INIT} $ENV{CFLAGS} ${CMAKE_C_FLAGS_INIT}" CACHE STRING
"Flags for C compiler.")
SET (CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS_INIT} $ENV{LDFLAGS}
CACHE STRING "Flags used by the linker.")
IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
# default build type is none
IF(NOT CMAKE_NO_BUILD_TYPE)
......
......@@ -2,5 +2,11 @@ SET(CMAKE_CXX_COMPILER "@CMAKE_CXX_COMPILER@")
SET(CMAKE_COMPILER_IS_GNUCXX @CMAKE_COMPILER_IS_GNUCXX@)
SET(CMAKE_CXX_COMPILER_LOADED 1)
SET(CMAKE_COMPILER_IS_GNUCC_RUN 1)
SET(CMAKE_CXX_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
SET(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm)
SET(CMAKE_CXX_LINKER_PREFERENCE Prefered)
IF(UNIX)
SET(CMAKE_CXX_OUTPUT_EXTENSION .o)
ELSE(UNIX)
SET(CMAKE_CXX_OUTPUT_EXTENSION .obj)
ENDIF(UNIX)
......@@ -30,17 +30,25 @@ IF(NOT CMAKE_SHARED_LIBRARY_CXX_FLAGS)
ENDIF(NOT CMAKE_SHARED_LIBRARY_CXX_FLAGS)
IF(NOT CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_FLAGS})
SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS})
ENDIF(NOT CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG)
SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_FLAG})
SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG})
ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG)
IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP)
SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP})
SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP})
ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP)
IF(NOT CMAKE_INCLUDE_FLAG_CXX)
SET(CMAKE_INCLUDE_FLAG_CXX ${CMAKE_INCLUDE_FLAG_C})
ENDIF(NOT CMAKE_INCLUDE_FLAG_CXX)
IF(NOT CMAKE_INCLUDE_FLAG_SEP_CXX)
SET(CMAKE_INCLUDE_FLAG_SEP_CXX ${CMAKE_INCLUDE_FLAG_SEP_C})
ENDIF(NOT CMAKE_INCLUDE_FLAG_SEP_CXX)
# repeat for modules
IF(NOT CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS)
SET(CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS})
......
......@@ -2,6 +2,10 @@
# cache values that can be initialized in the platform-compiler.cmake file
# it may be included by more than one language.
SET (CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS_INIT} $ENV{LDFLAGS}
CACHE STRING "Flags used by the linker.")
IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
# default build type is none
IF(NOT CMAKE_NO_BUILD_TYPE)
......
# determine the compiler to use for Java programs
# NOTE, a generator may set CMAKE_JAVA_COMPILER before
# NOTE, a generator may set CMAKE_Java_COMPILER before
# loading this file to force a compiler.
IF(NOT CMAKE_JAVA_COMPILER)
IF(NOT CMAKE_Java_COMPILER)
# prefer the environment variable CC
IF($ENV{JAVA_COMPILER} MATCHES ".+")
GET_FILENAME_COMPONENT(CMAKE_JAVA_COMPILER_INIT $ENV{JAVA_COMPILER} PROGRAM PROGRAM_ARGS CMAKE_JAVA_FLAGS_ENV_INIT)
IF(EXISTS ${CMAKE_JAVA_COMPILER_INIT})
ELSE(EXISTS ${CMAKE_JAVA_COMPILER_INIT})
GET_FILENAME_COMPONENT(CMAKE_Java_COMPILER_INIT $ENV{JAVA_COMPILER} PROGRAM PROGRAM_ARGS CMAKE_Java_FLAGS_ENV_INIT)
IF(EXISTS ${CMAKE_Java_COMPILER_INIT})
ELSE(EXISTS ${CMAKE_Java_COMPILER_INIT})
MESSAGE(SEND_ERROR "Could not find compiler set in environment variable JAVA_COMPILER:\n$ENV{JAVA_COMPILER}.")
ENDIF(EXISTS ${CMAKE_JAVA_COMPILER_INIT})
ENDIF(EXISTS ${CMAKE_Java_COMPILER_INIT})
ENDIF($ENV{JAVA_COMPILER} MATCHES ".+")
IF($ENV{JAVA_RUNTIME} MATCHES ".+")
GET_FILENAME_COMPONENT(CMAKE_JAVA_RUNTIME_INIT $ENV{JAVA_RUNTIME} PROGRAM PROGRAM_ARGS CMAKE_JAVA_FLAGS_ENV_INIT)
IF(EXISTS ${CMAKE_JAVA_RUNTIME_INIT})
ELSE(EXISTS ${CMAKE_JAVA_RUNTIME_INIT})
GET_FILENAME_COMPONENT(CMAKE_Java_RUNTIME_INIT $ENV{JAVA_RUNTIME} PROGRAM PROGRAM_ARGS CMAKE_Java_FLAGS_ENV_INIT)
IF(EXISTS ${CMAKE_Java_RUNTIME_INIT})
ELSE(EXISTS ${CMAKE_Java_RUNTIME_INIT})
MESSAGE(SEND_ERROR "Could not find compiler set in environment variable JAVA_RUNTIME:\n$ENV{JAVA_RUNTIME}.")
ENDIF(EXISTS ${CMAKE_JAVA_RUNTIME_INIT})
ENDIF(EXISTS ${CMAKE_Java_RUNTIME_INIT})
ENDIF($ENV{JAVA_RUNTIME} MATCHES ".+")
IF($ENV{JAVA_ARCHIVE} MATCHES ".+")
GET_FILENAME_COMPONENT(CMAKE_JAVA_ARCHIVE_INIT $ENV{JAVA_ARCHIVE} PROGRAM PROGRAM_ARGS CMAKE_JAVA_FLAGS_ENV_INIT)
IF(EXISTS ${CMAKE_JAVA_ARCHIVE_INIT})
ELSE(EXISTS ${CMAKE_JAVA_ARCHIVE_INIT})
GET_FILENAME_COMPONENT(CMAKE_Java_ARCHIVE_INIT $ENV{JAVA_ARCHIVE} PROGRAM PROGRAM_ARGS CMAKE_Java_FLAGS_ENV_INIT)
IF(EXISTS ${CMAKE_Java_ARCHIVE_INIT})
ELSE(EXISTS ${CMAKE_Java_ARCHIVE_INIT})
MESSAGE(SEND_ERROR "Could not find compiler set in environment variable JAVA_ARCHIVE:\n$ENV{JAVA_ARCHIVE}.")
ENDIF(EXISTS ${CMAKE_JAVA_ARCHIVE_INIT})
ENDIF(EXISTS ${CMAKE_Java_ARCHIVE_INIT})
ENDIF($ENV{JAVA_ARCHIVE} MATCHES ".+")
SET(JAVA_BIN_PATH
SET(Java_BIN_PATH
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\2.0;JavaHome]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.9;JavaHome]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.8;JavaHome]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.7;JavaHome]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.6;JavaHome]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.5;JavaHome]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.4;JavaHome]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.3;JavaHome]/bin"
/usr/bin
......@@ -36,41 +42,42 @@ IF(NOT CMAKE_JAVA_COMPILER)
/usr/share/java/bin
/usr/local/bin
/usr/local/java/bin
/usr/java/j2sdk1.4.2_04
)
# if no compiler has been specified yet, then look for one
IF(CMAKE_JAVA_COMPILER_INIT)
SET(CMAKE_JAVA_COMPILER ${CMAKE_JAVA_COMPILER_INIT} CACHE PATH "Java Compiler")
ELSE(CMAKE_JAVA_COMPILER_INIT)
FIND_PROGRAM(CMAKE_JAVA_COMPILER
IF(CMAKE_Java_COMPILER_INIT)
SET(CMAKE_Java_COMPILER ${CMAKE_Java_COMPILER_INIT} CACHE PATH "Java Compiler")
ELSE(CMAKE_Java_COMPILER_INIT)
FIND_PROGRAM(CMAKE_Java_COMPILER
NAMES javac
PATHS ${JAVA_BIN_PATH}
PATHS ${Java_BIN_PATH}
)
ENDIF(CMAKE_JAVA_COMPILER_INIT)
ENDIF(CMAKE_Java_COMPILER_INIT)
# if no runtime has been specified yet, then look for one
IF(CMAKE_JAVA_RUNTIME_INIT)
SET(CMAKE_JAVA_RUNTIME ${CMAKE_JAVA_RUNTIME_INIT} CACHE PATH "Java Compiler")
ELSE(CMAKE_JAVA_RUNTIME_INIT)
FIND_PROGRAM(CMAKE_JAVA_RUNTIME
IF(CMAKE_Java_RUNTIME_INIT)
SET(CMAKE_Java_RUNTIME ${CMAKE_Java_RUNTIME_INIT} CACHE PATH "Java Compiler")
ELSE(CMAKE_Java_RUNTIME_INIT)
FIND_PROGRAM(CMAKE_Java_RUNTIME
NAMES java
PATHS ${JAVA_BIN_PATH}
PATHS ${Java_BIN_PATH}
)
ENDIF(CMAKE_JAVA_RUNTIME_INIT)
ENDIF(CMAKE_Java_RUNTIME_INIT)
# if no archive has been specified yet, then look for one
IF(CMAKE_JAVA_ARCHIVE_INIT)
SET(CMAKE_JAVA_ARCHIVE ${CMAKE_JAVA_ARCHIVE_INIT} CACHE PATH "Java Compiler")
ELSE(CMAKE_JAVA_ARCHIVE_INIT)
FIND_PROGRAM(CMAKE_JAVA_ARCHIVE
IF(CMAKE_Java_ARCHIVE_INIT)
SET(CMAKE_Java_ARCHIVE ${CMAKE_Java_ARCHIVE_INIT} CACHE PATH "Java Compiler")
ELSE(CMAKE_Java_ARCHIVE_INIT)
FIND_PROGRAM(CMAKE_Java_ARCHIVE
NAMES jar
PATHS ${JAVA_BIN_PATH}
PATHS ${Java_BIN_PATH}
)
ENDIF(CMAKE_JAVA_ARCHIVE_INIT)
ENDIF(NOT CMAKE_JAVA_COMPILER)
MARK_AS_ADVANCED(CMAKE_JAVA_COMPILER)
ENDIF(CMAKE_Java_ARCHIVE_INIT)
ENDIF(NOT CMAKE_Java_COMPILER)
MARK_AS_ADVANCED(CMAKE_Java_COMPILER)
# configure variables set in this file for fast reload later on
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeJavaCompiler.cmake.in
${CMAKE_BINARY_DIR}/CMakeJavaCompiler.cmake IMMEDIATE @ONLY)
MARK_AS_ADVANCED(CMAKE_AR CMAKE_JAVA_COMPILER_FULLPATH)
SET(CMAKE_JAVA_COMPILER_ENV_VAR "JC")
MARK_AS_ADVANCED(CMAKE_AR CMAKE_Java_COMPILER_FULLPATH)
SET(CMAKE_Java_COMPILER_ENV_VAR "JAVA_COMPILER")
# determine the compiler to use for C programs
# NOTE, a generator may set CMAKE_C_COMPILER before
# loading this file to force a compiler.
# use environment variable CCC first if defined by user, next use
# the cmake variable CMAKE_GENERATOR_CC which can be defined by a generator
# as a default compiler
IF(NOT CMAKE_RC_COMPILER)
# prefer the environment variable CC
IF($ENV{RC} MATCHES ".+")
GET_FILENAME_COMPONENT(CMAKE_RC_COMPILER_INIT $ENV{RC} PROGRAM PROGRAM_ARGS CMAKE_RC_FLAGS_ENV_INIT)
IF(EXISTS ${CMAKE_RC_COMPILER_INIT})
ELSE(EXISTS ${CMAKE_RC_COMPILER_INIT})
MESSAGE(FATAL_ERROR "Could not find compiler set in environment variable RC:\n$ENV{RC}.")
ENDIF(EXISTS ${CMAKE_RC_COMPILER_INIT})
ENDIF($ENV{RC} MATCHES ".+")
# next try prefer the compiler specified by the generator
IF(CMAKE_GENERATOR_RC)
IF(NOT CMAKE_RC_COMPILER_INIT)
SET(CMAKE_RC_COMPILER_INIT ${CMAKE_GENERATOR_RC})
ENDIF(NOT CMAKE_RC_COMPILER_INIT)
ENDIF(CMAKE_GENERATOR_RC)
# if no compiler has been specified yet, then look for one
IF(NOT CMAKE_RC_COMPILER_INIT)
SET(CMAKE_RC_COMPILER_LIST rc)
FIND_PROGRAM(CMAKE_RC_COMPILER_FULLPATH NAMES ${CMAKE_RC_COMPILER_LIST} )
GET_FILENAME_COMPONENT(CMAKE_RC_COMPILER_INIT
${CMAKE_RC_COMPILER_FULLPATH} NAME)
SET(CMAKE_RC_COMPILER_FULLPATH "${CMAKE_RC_COMPILER_FULLPATH}"
CACHE INTERNAL "full path to the compiler cmake found")
ENDIF(NOT CMAKE_RC_COMPILER_INIT)
SET(CMAKE_RC_COMPILER ${CMAKE_RC_COMPILER_INIT} CACHE STRING "RC compiler")
ENDIF(NOT CMAKE_RC_COMPILER)
MARK_AS_ADVANCED(CMAKE_RC_COMPILER)
# configure variables set in this file for fast reload later on
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeRCCompiler.cmake.in
${CMAKE_BINARY_DIR}/CMakeRCCompiler.cmake IMMEDIATE)
SET(CMAKE_RC_COMPILER_ENV_VAR "RC")
......@@ -24,15 +24,15 @@ IF(NOT CMAKE_SHARED_LIBRARY_Fortran_FLAGS)
ENDIF(NOT CMAKE_SHARED_LIBRARY_Fortran_FLAGS)
IF(NOT CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS)
SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_FLAGS})
SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS})
ENDIF(NOT CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS)
IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG)
SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_FLAG})
SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG})
ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG)
IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP)
SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP})
SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP})
ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP)
# repeat for modules
......@@ -49,13 +49,21 @@ IF(NOT CMAKE_SHARED_MODULE_LINK_Fortran_FLAGS)
ENDIF(NOT CMAKE_SHARED_MODULE_LINK_Fortran_FLAGS)
IF(NOT CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG)
SET(CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG ${CMAKE_SHARED_MODULE_RUNTIME_FLAG})
SET(CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG ${CMAKE_SHARED_MODULE_RUNTIME_C_FLAG})
ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG)
IF(NOT CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG_SEP)
SET(CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG_SEP ${CMAKE_SHARED_MODULE_RUNTIME_FLAG_SEP})
SET(CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG_SEP ${CMAKE_SHARED_MODULE_RUNTIME_C_FLAG_SEP})
ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG_SEP)
IF(NOT CMAKE_INCLUDE_FLAG_Fortran)
SET(CMAKE_INCLUDE_FLAG_Fortran ${CMAKE_INCLUDE_FLAG_C})
ENDIF(NOT CMAKE_INCLUDE_FLAG_Fortran)
IF(NOT CMAKE_INCLUDE_FLAG_SEP_Fortran)
SET(CMAKE_INCLUDE_FLAG_SEP_Fortran ${CMAKE_INCLUDE_FLAG_SEP_C})
ENDIF(NOT CMAKE_INCLUDE_FLAG_SEP_Fortran)
SET(CMAKE_VERBOSE_MAKEFILE FALSE CACHE BOOL "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo.")
SET (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS_ENV_INIT} $ENV{FFLAGS} ${CMAKE_Fortran_FLAGS_INIT}" CACHE STRING
......
......@@ -7,9 +7,11 @@ SET(CMAKE_SHARED_LIBRARY_SUFFIX ".so") # .so
SET(CMAKE_DL_LIBS "-ldl")
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
SET(CMAKE_SHARED_LIBRARY_LINK_FLAGS "") # +s, flag for exe link to use shared lib
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "") # -rpath
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP "") # : or empty
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") # -rpath
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty
SET(CMAKE_INCLUDE_FLAG_C "-I") # -I
SET(CMAKE_INCLUDE_FLAG_C_SEP "") # , or empty
SET(CMAKE_LIBRARY_PATH_FLAG "-L")
SET(CMAKE_LINK_LIBRARY_FLAG "-l")
IF(CMAKE_COMPILER_IS_GNUCC)
......
SET(CMAKE_JAVA_COMPILER "@CMAKE_JAVA_COMPILER@")
SET(CMAKE_JAVA_RUNTIME "@CMAKE_JAVA_RUNTIME@")
SET(CMAKE_JAVA_ARCHIVE "@CMAKE_JAVA_ARCHIVE@")
SET(CMAKE_JAVA_COMPILER_LOADED 1)
SET(CMAKE_JAVA_RUNTIME_LOADED 1)
SET(CMAKE_JAVA_ARCHIVE_LOADED 1)
MACRO(ADD_JAVA_LIBRARY LIBRARYNAME SOURCES)
IF(CMAKE_JAVA_COMPILER AND CMAKE_JAVA_ARCHIVE)
SET(CMAKE_JAVA_INCLUDE_PATH ${CMAKE_JAVA_INCLUDE_PATH}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${LIBRARY_OUTPUT_PATH})
SET(CMAKE_JAVA_INCLUDE_PATH_TOTAL "")
FOREACH(DIR ${CMAKE_JAVA_INCLUDE_PATH})
SET(CMAKE_JAVA_INCLUDE_PATH_TOTAL "${CMAKE_JAVA_INCLUDE_PATH_TOTAL}:${DIR}")
ENDFOREACH(DIR)
IF(WIN32)
STRING(REGEX REPLACE "/" "\\\\" CMAKE_JAVA_INCLUDE_PATH_TOTAL
${CMAKE_JAVA_INCLUDE_PATH_TOTAL})
STRING(REGEX REPLACE "/" "\\\\" CMAKE_JAVA_CLASS_OUTPUT_PATH
${CMAKE_CURRENT_BINARY_DIR})
STRING(REGEX REPLACE ":([^\\/])" "\\\\;\\1" CMAKE_JAVA_INCLUDE_PATH_TOTAL
${CMAKE_JAVA_INCLUDE_PATH_TOTAL})
ELSE(WIN32)
SET(CMAKE_JAVA_CLASS_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
ENDIF(WIN32)
ADD_CUSTOM_TARGET(${LIBRARYNAME}_target ALL)
SET(CMAKE_JAVA_ALL_CLASS_FILES "")
SET(CMAKE_JAVA_ALL_CLASS_FILE_PATHS "")
SET(SKIP 1)
FOREACH(SOURCE ${ARGV})
IF(SKIP)
SET(SKIP 0)
ELSE(SKIP)
GET_FILENAME_COMPONENT(CLASS_FILE_PATH ${SOURCE} PATH)
GET_FILENAME_COMPONENT(CLASS_FILE_NAME ${SOURCE} NAME_WE)
SET(CLASS_FILE "${CLASS_FILE_PATH}/${CLASS_FILE_NAME}")
ADD_CUSTOM_COMMAND(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/${SOURCE}
COMMAND ${CMAKE_JAVA_COMPILER}
ARGS ${CMAKE_JAVA_COMPILE_FLAGS}
-classpath ${CMAKE_JAVA_INCLUDE_PATH_TOTAL}
${CMAKE_CURRENT_SOURCE_DIR}/${SOURCE}
-d ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/
TARGET ${LIBRARYNAME}_target
OUTPUTS "${CMAKE_JAVA_CLASS_OUTPUT_PATH}/${CLASS_FILE}.class"
COMMENT "Java File" )
SET(CMAKE_JAVA_ALL_CLASS_FILES ${CMAKE_JAVA_ALL_CLASS_FILES} ${CLASS_FILE}.class)
SET(CMAKE_JAVA_ALL_CLASS_FILE_PATHS ${CMAKE_JAVA_ALL_CLASS_FILE_PATHS} ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/${CLASS_FILE}.class)
ENDIF(SKIP)
ENDFOREACH(SOURCE)
IF(LIBRARY_OUTPUT_PATH)
SET(CMAKE_JAVA_LIBRARY_OUTPUT_PATH ${LIBRARY_OUTPUT_PATH})
ELSE(LIBRARY_OUTPUT_PATH)
SET(CMAKE_JAVA_LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
ENDIF(LIBRARY_OUTPUT_PATH)
ADD_CUSTOM_COMMAND(SOURCE ${CMAKE_JAVA_ALL_CLASS_FILE_PATHS}
COMMAND ${CMAKE_COMMAND}
ARGS -E chdir ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_JAVA_ARCHIVE}
-cvf ${CMAKE_JAVA_LIBRARY_OUTPUT_PATH}/${LIBRARYNAME}.jar ${CMAKE_JAVA_ALL_CLASS_FILES}
TARGET ${LIBRARYNAME}_target
DEPENDS ${CMAKE_JAVA_ALL_CLASS_FILE_PATHS}
OUTPUTS ${CMAKE_JAVA_LIBRARY_OUTPUT_PATH}/${LIBRARYNAME}.jar
COMMENT "Java Archive")
ADD_CUSTOM_COMMAND(SOURCE ${LIBRARYNAME}_target
TARGET ${LIBRARYNAME}_target
DEPENDS ${CMAKE_JAVA_LIBRARY_OUTPUT_PATH}/${LIBRARYNAME}.jar)
ELSE(CMAKE_JAVA_COMPILER AND CMAKE_JAVA_ARCHIVE)
MESSAGE(SEND_ERROR "Java compiler and/or Java archiver not found")
ENDIF(CMAKE_JAVA_COMPILER AND CMAKE_JAVA_ARCHIVE)
ENDMACRO(ADD_JAVA_LIBRARY LIBRARYNAME SOURCES)
SET(CMAKE_Java_COMPILER "@CMAKE_Java_COMPILER@")
SET(CMAKE_Java_RUNTIME "@CMAKE_Java_RUNTIME@")
SET(CMAKE_Java_ARCHIVE "@CMAKE_Java_ARCHIVE@")
SET(CMAKE_Java_COMPILER_LOADED 1)
SET(CMAKE_Java_SOURCE_FILE_EXTENSIONS java)
SET(CMAKE_Java_LINKER_PREFERENCE Prefered)
SET(CMAKE_Java_OUTPUT_EXTENSION .class)
# this is a place holder if java needed flags for javac they would go here.
SET(CMAKE_STATIC_LIBRARY_SUFFIX_Java ".jar")
IF(NOT CMAKE_Java_CREATE_STATIC_LIBRARY)
SET(CMAKE_Java_CREATE_STATIC_LIBRARY
"<CMAKE_Java_ARCHIVE> -cf <TARGET> *.class")
# should be this <OBJECTS> but compling a java file can create more than one .class file
# so for now get all of them
ENDIF(NOT CMAKE_Java_CREATE_STATIC_LIBRARY)
# compile a Java file into an object file
IF(NOT CMAKE_Java_COMPILE_OBJECT)
SET(CMAKE_Java_COMPILE_OBJECT
"<CMAKE_Java_COMPILER> <FLAGS> <SOURCE> -d \"<CMAKE_CURRENT_BINARY_DIR>\"")
ENDIF(NOT CMAKE_Java_COMPILE_OBJECT)
# set java include flag option and the separator for multiple include paths
SET(CMAKE_INCLUDE_FLAG_Java "-classpath ")
IF(WIN32 AND NOT CYGWIN)
SET(CMAKE_INCLUDE_FLAG_SEP_Java ";")
ELSE(WIN32 AND NOT CYGWIN)
SET(CMAKE_INCLUDE_FLAG_SEP_Java ":")
ENDIF(WIN32 AND NOT CYGWIN)
SET(CMAKE_RC_COMPILER "@CMAKE_RC_COMPILER@")
SET(CMAKE_RC_COMPILER_LOADED 1)
SET(CMAKE_RC_SOURCE_FILE_EXTENSIONS rc)
SET(CMAKE_RC_OUTPUT_EXTENSION .res)
# This file sets the basic flags for the Fortran language in CMake.
# It also loads the available platform file for the system-compiler
# if it exists.
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_RC_COMPILER} NAME_WE)
SET(CMAKE_SYSTEM_AND_RC_COMPILER_INFO_FILE
${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
SET (CMAKE_RC_FLAGS "${CMAKE_RC_FLAGS_ENV_INIT} $ENV{RCFLAGS} ${CMAKE_RC_FLAGS_INIT}" CACHE STRING
"Flags for Fortran compiler.")
# now define the following rule variables
# CMAKE_RC_COMPILE_OBJECT
# compile a Resource file into an object file
IF(NOT CMAKE_RC_COMPILE_OBJECT)
SET(CMAKE_RC_COMPILE_OBJECT
"<CMAKE_RC_COMPILER> <FLAGS> /fo<OBJECT> <SOURCE>")
ENDIF(NOT CMAKE_RC_COMPILE_OBJECT)
MARK_AS_ADVANCED(
CMAKE_RC_FLAGS
)
# set this variable so we can avoid loading this more than once.
SET(CMAKE_RC_INFOMATION_LOADED 1)
......@@ -29,9 +29,9 @@ ENDIF(EXISTS ${CMAKE_SYSTEM_INFO_FILE})
IF(NOT CMAKE_MODULE_EXISTS)
SET(CMAKE_SHARED_MODULE_PREFIX ${CMAKE_SHARED_LIBRARY_PREFIX})
SET(CMAKE_SHARED_MODULE_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX})
SET(CMAKE_SHARED_MODULE_LINK_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_FLAGS})
SET(CMAKE_SHARED_MODULE_RUNTIME_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_FLAG})
SET(CMAKE_SHARED_MODULE_RUNTIME_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP})
SET(CMAKE_SHARED_MODULE_LINK_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS})
SET(CMAKE_SHARED_MODULE_RUNTIME_C_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG})
SET(CMAKE_SHARED_MODULE_RUNTIME_C_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP})
ENDIF(NOT CMAKE_MODULE_EXISTS)
......
# This file is used by EnableLanguage in cmGlobalGenerator to
# determine that that selected Fortran compiler can actually compile
# and link the most basic of programs. If not, a fatal error
# is set and cmake stops processing commands and will not generate
# any makefiles or projects.
# This file is used by EnableLanguage in cmGlobalGenerator to
# determine that that selected RC compiler can actually compile
# and link the most basic of programs. If not, a fatal error
# is set and cmake stops processing commands and will not generate
# any makefiles or projects.
# For now there is no way to do a try compile on just a .rc file
# so just do nothing in here.
......@@ -2,7 +2,7 @@ SET(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib
SET(CMAKE_SHARED_LIBRARY_SUFFIX ".so") # .so
SET(CMAKE_DL_LIBS "-lld")
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-G -Wl,-brtl") # -shared
SET(CMAKE_SHARED_LIBRARY_LINK_FLAGS "-Wl,-brtl,-bexpall") # +s, flag for exe link to use shared lib
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,-brtl,-bexpall") # +s, flag for exe link to use shared lib
IF(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-shared -Wl,-G") # -shared
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
......
......@@ -2,8 +2,8 @@ IF(EXISTS /usr/include/dlfcn.h)
SET(CMAKE_DL_LIBS "")
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
SET(CMAKE_SHARED_LIBRARY_LINK_FLAGS "") # +s, flag for exe link to use shared lib
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "-Wl,-rpath,") # -rpath
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP ":") # : or empty
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") # -rpath
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") # : or empty
ENDIF(EXISTS /usr/include/dlfcn.h)
# include the gcc flags
SET(CMAKE_SHARED_LIBRARY_SUFFIX ".sl") # .so
SET(CMAKE_DL_LIBS "-ldld")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP ":") # : or empty
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") # : or empty
# fortran
IF(CMAKE_COMPILER_IS_GNUG77)
SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-fPIC") # -pic
SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-shared -Wl,-E -Wl,-b") # -shared
SET(CMAKE_SHARED_LIBRARY_LINK_FLAGS "-Wl,+s -Wl,-E") # +s, flag for exe link to use shared lib
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "-Wl,+b") # -rpath
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP ":") # : or empty
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,+s -Wl,-E") # +s, flag for exe link to use shared lib
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,+b") # -rpath
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") # : or empty
SET(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "-Wl,+h")
SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-fPIC") # -pic
ELSE(CMAKE_COMPILER_IS_GNUG77)
......@@ -18,8 +18,8 @@ ELSE(CMAKE_COMPILER_IS_GNUG77)
"ld <CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG><TARGET_SONAME> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "+Z") # -pic
SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-E -b -L/usr/lib") # -shared
SET(CMAKE_SHARED_LIBRARY_LINK_FLAGS "-Wl,+s -Wl,-E") # +s, flag for exe link to use shared lib
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "+b") # -rpath
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,+s -Wl,-E") # +s, flag for exe link to use shared lib
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "+b") # -rpath
SET(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "+h")
ENDIF(CMAKE_COMPILER_IS_GNUG77)
# C compiler
......@@ -27,9 +27,9 @@ IF(CMAKE_COMPILER_IS_GNUCC)
# gnu gcc
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,-E -Wl,-b") # -shared
SET(CMAKE_SHARED_LIBRARY_LINK_FLAGS "-Wl,+s -Wl,-E") # +s, flag for exe link to use shared lib
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "-Wl,+b") # -rpath
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP ":") # : or empty
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,+s -Wl,-E") # +s, flag for exe link to use shared lib
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,+b") # -rpath
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") # : or empty
SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,+h")
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic
ELSE(CMAKE_COMPILER_IS_GNUCC)
......@@ -40,8 +40,8 @@ ELSE(CMAKE_COMPILER_IS_GNUCC)
"ld <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_C_FLAG><TARGET_SONAME> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "+Z") # -pic
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-E -b -L/usr/lib") # -shared
SET(CMAKE_SHARED_LIBRARY_LINK_FLAGS "-Wl,+s -Wl,-E") # +s, flag for exe link to use shared lib
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "+b") # -rpath
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,+s -Wl,-E") # +s, flag for exe link to use shared lib
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "+b") # -rpath
SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "+h")
ENDIF(CMAKE_COMPILER_IS_GNUCC)
......
SET(CMAKE_DL_LIBS "")
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -rdata_shared")
SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-shared -rdata_shared")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "-Wl,-rpath,") # -rpath
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP "") # : or empty
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") # -rpath
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty
IF(NOT CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_CXX_CREATE_STATIC_LIBRARY
"<CMAKE_CXX_COMPILER> -ar -o <TARGET> <OBJECTS>")
......
SET(CMAKE_DL_LIBS "")
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -rdata_shared")
SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-shared -rdata_shared")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "-Wl,-rpath,") # -rpath
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP "") # : or empty
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") # -rpath
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty
SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-soname,")
IF(NOT CMAKE_COMPILER_IS_GNUCXX)
......
......@@ -13,6 +13,6 @@ SET(CMAKE_CXX_LINK_EXECUTABLE
"<CMAKE_CXX_COMPILER> --prelink_objects <OBJECTS>"
"<CMAKE_CXX_COMPILER> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "")
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "")
SET(CMAKE_SHARED_LIBRARY_LINK_FLAGS "")
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
......@@ -2,8 +2,8 @@
SET(CMAKE_DL_LIBS "-ldl")
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC")
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared")
SET(CMAKE_SHARED_LIBRARY_LINK_FLAGS "-rdynamic")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "-Wl,-rpath,")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP ":")
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-rdynamic")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-soname,")
......@@ -2,7 +2,7 @@ IF(CMAKE_SYSTEM MATCHES "MP-RAS-02*.")
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-K PIC")
ELSE(CMAKE_SYSTEM MATCHES "MP-RAS-02*.")
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-K PIC")
SET(CMAKE_SHARED_LIBRARY_LINK_FLAGS "-Wl,-Bexport")
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,-Bexport")
ENDIF(CMAKE_SYSTEM MATCHES "MP-RAS-02*.")
......
......@@ -2,7 +2,7 @@ IF(EXISTS /usr/include/dlfcn.h)
SET(CMAKE_DL_LIBS "")
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
SET(CMAKE_SHARED_LIBRARY_LINK_FLAGS "") # +s, flag for exe link to use shared lib
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "-Wl,-rpath,") # -rpath
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP ":") # : or empty
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") # -rpath
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") # : or empty
ENDIF(EXISTS /usr/include/dlfcn.h)
......@@ -19,11 +19,11 @@ IF(CMAKE_SYSTEM MATCHES "OSF1-V.*")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-rpath ")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
IF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "-Wl,-rpath,")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
ELSE(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "-rpath ")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-rpath ")
ENDIF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP ":")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
ENDIF(CMAKE_SYSTEM MATCHES "OSF1-V.*")
......
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-G 0")
SET(CMAKE_SHARED_LIBRARY_SUFFIX "..o")
SET(CMAKE_DL_LIBS "")
SET(CMAKE_SHARED_LIBRARY_LINK_FLAGS "-Wl,-D,08000000")
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,-D,08000000")
IF(CMAKE_SYSTEM MATCHES "SunOS-4.*")
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-PIC")
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,-r")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "-Wl,-R")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP ":")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-R")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-h")
SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-h")
ENDIF(CMAKE_SYSTEM MATCHES "SunOS-4.*")
......@@ -10,8 +10,8 @@ ENDIF(CMAKE_SYSTEM MATCHES "SunOS-4.*")
IF(CMAKE_SYSTEM MATCHES "SunOS-5*.")
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-KPIC")
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-G")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "-R")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP ":")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-R")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-h")
SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-h")
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-KPIC")
......@@ -21,8 +21,8 @@ IF(CMAKE_SYSTEM MATCHES "SunOS-5*.")
IF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC")
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "-Wl,-R")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP ":")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-R")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-h")
ENDIF(CMAKE_COMPILER_IS_GNUCC)
IF(CMAKE_COMPILER_IS_GNUCXX)
......
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-G 0")
SET(CMAKE_SHARED_LIBRARY_SUFFIX "..o")
SET(CMAKE_DL_LIBS "")
SET(CMAKE_SHARED_LIBRARY_LINK_FLAGS "-Wl,-D,08000000")
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,-D,08000000")
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-K PIC")
SET(CMAKE_SHARED_LIBRARY_LINK_FLAGS "-Wl,-Bexport")
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,-Bexport")
......@@ -32,6 +32,7 @@ SET(CMAKE_C_COMPILE_OBJECT
SET(CMAKE_C_LINK_EXECUTABLE
"<CMAKE_C_COMPILER> /nologo ${CMAKE_START_TEMP_FILE} <FLAGS> <OBJECTS> /Fe<TARGET> -link <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}")
ENABLE_LANGUAGE(RC)
SET(CMAKE_COMPILE_RESOURCE "rc <FLAGS> /fo<OBJECT> <SOURCE>")
SET(CMAKE_CXX_LINK_EXECUTABLE
......@@ -60,35 +61,38 @@ IF(CMAKE_GENERATOR MATCHES "Visual Studio 8")
SET(CMAKE_COMPILER_2005 1)
ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 8")
IF(CMAKE_GENERATOR MATCHES "NMake Makefiles")
EXEC_PROGRAM(${CMAKE_C_COMPILER}
ARGS /nologo -EP \"${CMAKE_ROOT}/Modules/CMakeTestNMakeCLVersion.c\"
OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT
RETURN_VALUE CMAKE_COMPILER_RETURN
)
IF(NOT CMAKE_COMPILER_RETURN)
IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*VERSION=1[3-9][0-9][0-9].*" )
SET(CMAKE_COMPILER_SUPPORTS_PDBTYPE 0)
ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*VERSION=1[3-9][0-9][0-9].*" )
IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*VERSION=1[4-9][0-9][0-9].*" )
SET(CMAKE_COMPILER_2005 1)
ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*VERSION=1[4-9][0-9][0-9].*" )
ENDIF(NOT CMAKE_COMPILER_RETURN)
MAKE_DIRECTORY("${CMAKE_BINARY_DIR}/CMakeTmp")
# try to figure out if we are running the free command line
# tools from Microsoft. These tools do not provide debug libraries,
# so the link flags used have to be different.
EXEC_PROGRAM(${CMAKE_CXX_COMPILER} ${CMAKE_BINARY_DIR}/CMakeTmp