Merge topic 'toolchain-flag-init'
a66004be
Honor CMAKE_<LANG>_FLAGS[_<CONFIG>]_INIT set in toolchain filescdde77e5
OpenWatcom: Partially modernize platform information modulesf9dbe22c
Intel: Do not use GNU-like flags on Windows5a3ed0d7
Intel: Do not use MSVC-like flags for Fortran
This commit is contained in:
commit
0ca8f3e699
|
@ -344,10 +344,15 @@ Variables for Languages
|
||||||
/variable/CMAKE_LANG_CREATE_SHARED_MODULE
|
/variable/CMAKE_LANG_CREATE_SHARED_MODULE
|
||||||
/variable/CMAKE_LANG_CREATE_STATIC_LIBRARY
|
/variable/CMAKE_LANG_CREATE_STATIC_LIBRARY
|
||||||
/variable/CMAKE_LANG_FLAGS_DEBUG
|
/variable/CMAKE_LANG_FLAGS_DEBUG
|
||||||
|
/variable/CMAKE_LANG_FLAGS_DEBUG_INIT
|
||||||
/variable/CMAKE_LANG_FLAGS_MINSIZEREL
|
/variable/CMAKE_LANG_FLAGS_MINSIZEREL
|
||||||
|
/variable/CMAKE_LANG_FLAGS_MINSIZEREL_INIT
|
||||||
/variable/CMAKE_LANG_FLAGS_RELEASE
|
/variable/CMAKE_LANG_FLAGS_RELEASE
|
||||||
|
/variable/CMAKE_LANG_FLAGS_RELEASE_INIT
|
||||||
/variable/CMAKE_LANG_FLAGS_RELWITHDEBINFO
|
/variable/CMAKE_LANG_FLAGS_RELWITHDEBINFO
|
||||||
|
/variable/CMAKE_LANG_FLAGS_RELWITHDEBINFO_INIT
|
||||||
/variable/CMAKE_LANG_FLAGS
|
/variable/CMAKE_LANG_FLAGS
|
||||||
|
/variable/CMAKE_LANG_FLAGS_INIT
|
||||||
/variable/CMAKE_LANG_GHS_KERNEL_FLAGS_DEBUG
|
/variable/CMAKE_LANG_GHS_KERNEL_FLAGS_DEBUG
|
||||||
/variable/CMAKE_LANG_GHS_KERNEL_FLAGS_MINSIZEREL
|
/variable/CMAKE_LANG_GHS_KERNEL_FLAGS_MINSIZEREL
|
||||||
/variable/CMAKE_LANG_GHS_KERNEL_FLAGS_RELEASE
|
/variable/CMAKE_LANG_GHS_KERNEL_FLAGS_RELEASE
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
toolchain-flag-init
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
* :variable:`Toolchain files <CMAKE_TOOLCHAIN_FILE>` may now set a
|
||||||
|
:variable:`CMAKE_<LANG>_FLAGS_INIT` variable to initialize the
|
||||||
|
:variable:`CMAKE_<LANG>_FLAGS` cache entry the first time a language is
|
||||||
|
enabled in a build tree.
|
|
@ -0,0 +1,10 @@
|
||||||
|
CMAKE_<LANG>_FLAGS_DEBUG_INIT
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
Value used to initialize the :variable:`CMAKE_<LANG>_FLAGS_DEBUG` cache
|
||||||
|
entry the first time a build tree is configured for language ``<LANG>``.
|
||||||
|
This variable is meant to be set by a :variable:`toolchain file
|
||||||
|
<CMAKE_TOOLCHAIN_FILE>`. CMake may prepend or append content to
|
||||||
|
the value based on the environment and target platform.
|
||||||
|
|
||||||
|
See also :variable:`CMAKE_<LANG>_FLAGS_INIT`.
|
|
@ -0,0 +1,15 @@
|
||||||
|
CMAKE_<LANG>_FLAGS_INIT
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
Value used to initialize the :variable:`CMAKE_<LANG>_FLAGS` cache entry
|
||||||
|
the first time a build tree is configured for language ``<LANG>``.
|
||||||
|
This variable is meant to be set by a :variable:`toolchain file
|
||||||
|
<CMAKE_TOOLCHAIN_FILE>`. CMake may prepend or append content to
|
||||||
|
the value based on the environment and target platform.
|
||||||
|
|
||||||
|
See also the configuration-specific variables:
|
||||||
|
|
||||||
|
* :variable:`CMAKE_<LANG>_FLAGS_DEBUG_INIT`
|
||||||
|
* :variable:`CMAKE_<LANG>_FLAGS_RELEASE_INIT`
|
||||||
|
* :variable:`CMAKE_<LANG>_FLAGS_MINSIZEREL_INIT`
|
||||||
|
* :variable:`CMAKE_<LANG>_FLAGS_RELWITHDEBINFO_INIT`
|
|
@ -0,0 +1,10 @@
|
||||||
|
CMAKE_<LANG>_FLAGS_MINSIZEREL_INIT
|
||||||
|
----------------------------------
|
||||||
|
|
||||||
|
Value used to initialize the :variable:`CMAKE_<LANG>_FLAGS_MINSIZEREL`
|
||||||
|
cache entry the first time a build tree is configured for language ``<LANG>``.
|
||||||
|
This variable is meant to be set by a :variable:`toolchain file
|
||||||
|
<CMAKE_TOOLCHAIN_FILE>`. CMake may prepend or append content to
|
||||||
|
the value based on the environment and target platform.
|
||||||
|
|
||||||
|
See also :variable:`CMAKE_<LANG>_FLAGS_INIT`.
|
|
@ -0,0 +1,10 @@
|
||||||
|
CMAKE_<LANG>_FLAGS_RELEASE_INIT
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
Value used to initialize the :variable:`CMAKE_<LANG>_FLAGS_RELEASE`
|
||||||
|
cache entry the first time a build tree is configured for language ``<LANG>``.
|
||||||
|
This variable is meant to be set by a :variable:`toolchain file
|
||||||
|
<CMAKE_TOOLCHAIN_FILE>`. CMake may prepend or append content to
|
||||||
|
the value based on the environment and target platform.
|
||||||
|
|
||||||
|
See also :variable:`CMAKE_<LANG>_FLAGS_INIT`.
|
|
@ -0,0 +1,10 @@
|
||||||
|
CMAKE_<LANG>_FLAGS_RELWITHDEBINFO_INIT
|
||||||
|
--------------------------------------
|
||||||
|
|
||||||
|
Value used to initialize the :variable:`CMAKE_<LANG>_FLAGS_RELWITHDEBINFO`
|
||||||
|
cache entry the first time a build tree is configured for language ``<LANG>``.
|
||||||
|
This variable is meant to be set by a :variable:`toolchain file
|
||||||
|
<CMAKE_TOOLCHAIN_FILE>`. CMake may prepend or append content to
|
||||||
|
the value based on the environment and target platform.
|
||||||
|
|
||||||
|
See also :variable:`CMAKE_<LANG>_FLAGS_INIT`.
|
|
@ -14,8 +14,10 @@ variables that must be set before CMake builds its first test project
|
||||||
to check that the compiler for a language works. It should not be
|
to check that the compiler for a language works. It should not be
|
||||||
used to load a file in cases that a normal :command:`include` will work. Use
|
used to load a file in cases that a normal :command:`include` will work. Use
|
||||||
it only as a last resort for behavior that cannot be achieved any
|
it only as a last resort for behavior that cannot be achieved any
|
||||||
other way. For example, one may set ``CMAKE_C_FLAGS_INIT`` to change the
|
other way. For example, one may set the
|
||||||
default value used to initialize :variable:`CMAKE_C_FLAGS <CMAKE_<LANG>_FLAGS>`
|
:variable:`CMAKE_C_FLAGS_INIT <CMAKE_<LANG>_FLAGS_INIT>` variable
|
||||||
|
to change the default value used to initialize the
|
||||||
|
:variable:`CMAKE_C_FLAGS <CMAKE_<LANG>_FLAGS>` variable
|
||||||
before it is cached. The override file should NOT be used to set anything
|
before it is cached. The override file should NOT be used to set anything
|
||||||
that could be set after languages are enabled, such as variables like
|
that could be set after languages are enabled, such as variables like
|
||||||
:variable:`CMAKE_RUNTIME_OUTPUT_DIRECTORY` that affect the placement of
|
:variable:`CMAKE_RUNTIME_OUTPUT_DIRECTORY` that affect the placement of
|
||||||
|
|
|
@ -20,11 +20,11 @@ set(CMAKE_AR "${CMAKE_ARMCC_AR}" CACHE FILEPATH "The ARMCC archiver" FORCE)
|
||||||
mark_as_advanced(CMAKE_ARMCC_AR)
|
mark_as_advanced(CMAKE_ARMCC_AR)
|
||||||
|
|
||||||
macro(__compiler_armcc lang)
|
macro(__compiler_armcc lang)
|
||||||
set(CMAKE_${lang}_FLAGS_INIT "")
|
string(APPEND CMAKE_${lang}_FLAGS_INIT " ")
|
||||||
set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-g")
|
string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g")
|
||||||
set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "-Ospace -DNDEBUG")
|
string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -Ospace -DNDEBUG")
|
||||||
set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-Otime -DNDEBUG")
|
string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -Otime -DNDEBUG")
|
||||||
set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
|
string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -g")
|
||||||
|
|
||||||
set(CMAKE_${lang}_OUTPUT_EXTENSION ".o")
|
set(CMAKE_${lang}_OUTPUT_EXTENSION ".o")
|
||||||
set(CMAKE_${lang}_OUTPUT_EXTENSION_REPLACE 1)
|
set(CMAKE_${lang}_OUTPUT_EXTENSION_REPLACE 1)
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
set(CMAKE_Fortran_FLAGS_INIT "")
|
string(APPEND CMAKE_Fortran_FLAGS_INIT " ")
|
||||||
set(CMAKE_Fortran_FLAGS_DEBUG_INIT "-g")
|
string(APPEND CMAKE_Fortran_FLAGS_DEBUG_INIT " -g")
|
||||||
set(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "")
|
string(APPEND CMAKE_Fortran_FLAGS_MINSIZEREL_INIT " ")
|
||||||
set(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3")
|
string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -O3")
|
||||||
set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
|
string(APPEND CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT " -O2 -g")
|
||||||
set(CMAKE_Fortran_MODDIR_FLAG "-YMOD_OUT_DIR=")
|
set(CMAKE_Fortran_MODDIR_FLAG "-YMOD_OUT_DIR=")
|
||||||
set(CMAKE_Fortran_MODPATH_FLAG "-p")
|
set(CMAKE_Fortran_MODPATH_FLAG "-p")
|
||||||
set(CMAKE_Fortran_VERBOSE_FLAG "-v")
|
set(CMAKE_Fortran_VERBOSE_FLAG "-v")
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Bruce C Compiler ignores "-g" flag and optimization cannot be
|
# Bruce C Compiler ignores "-g" flag and optimization cannot be
|
||||||
# enabled here (it is implemented only for 8086 target).
|
# enabled here (it is implemented only for 8086 target).
|
||||||
set (CMAKE_C_FLAGS_INIT "-D__CLASSIC_C__")
|
string(APPEND CMAKE_C_FLAGS_INIT " -D__CLASSIC_C__")
|
||||||
set (CMAKE_C_FLAGS_DEBUG_INIT "-g")
|
string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " -g")
|
||||||
set (CMAKE_C_FLAGS_MINSIZEREL_INIT "-DNDEBUG")
|
string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -DNDEBUG")
|
||||||
set (CMAKE_C_FLAGS_RELEASE_INIT "-DNDEBUG")
|
string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -DNDEBUG")
|
||||||
set (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-g -DNDEBUG")
|
string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO_INIT " -g -DNDEBUG")
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
set(CMAKE_Fortran_FLAGS_INIT "")
|
string(APPEND CMAKE_Fortran_FLAGS_INIT " ")
|
||||||
set(CMAKE_Fortran_FLAGS_DEBUG_INIT "-g")
|
string(APPEND CMAKE_Fortran_FLAGS_DEBUG_INIT " -g")
|
||||||
set(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-Os")
|
string(APPEND CMAKE_Fortran_FLAGS_MINSIZEREL_INIT " -Os")
|
||||||
set(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3")
|
string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -O3")
|
||||||
set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
|
string(APPEND CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT " -O2 -g")
|
||||||
set(CMAKE_Fortran_MODDIR_FLAG "-fmod=")
|
set(CMAKE_Fortran_MODDIR_FLAG "-fmod=")
|
||||||
set(CMAKE_Fortran_VERBOSE_FLAG "-v")
|
set(CMAKE_Fortran_VERBOSE_FLAG "-v")
|
||||||
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-ffixed-form")
|
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-ffixed-form")
|
||||||
|
|
|
@ -3,11 +3,11 @@ include(Compiler/GHS)
|
||||||
set(CMAKE_C_VERBOSE_FLAG "-v")
|
set(CMAKE_C_VERBOSE_FLAG "-v")
|
||||||
set(CMAKE_C_OUTPUT_EXTENSION ".o")
|
set(CMAKE_C_OUTPUT_EXTENSION ".o")
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS_INIT "")
|
string(APPEND CMAKE_C_FLAGS_INIT " ")
|
||||||
set(CMAKE_C_FLAGS_DEBUG_INIT "-Odebug -g")
|
string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " -Odebug -g")
|
||||||
set(CMAKE_C_FLAGS_MINSIZEREL_INIT "-Ospace")
|
string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -Ospace")
|
||||||
set(CMAKE_C_FLAGS_RELEASE_INIT "-O")
|
string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -O")
|
||||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O -g")
|
string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO_INIT " -O -g")
|
||||||
|
|
||||||
set(CMAKE_C_GHS_KERNEL_FLAGS_DEBUG_INIT "-ldebug ${CMAKE_C_FLAGS_DEBUG_INIT}")
|
set(CMAKE_C_GHS_KERNEL_FLAGS_DEBUG_INIT "-ldebug ${CMAKE_C_FLAGS_DEBUG_INIT}")
|
||||||
set(CMAKE_C_GHS_KERNEL_FLAGS_MINSIZEREL_INIT "${CMAKE_C_FLAGS_MINSIZEREL_INIT}")
|
set(CMAKE_C_GHS_KERNEL_FLAGS_MINSIZEREL_INIT "${CMAKE_C_FLAGS_MINSIZEREL_INIT}")
|
||||||
|
|
|
@ -3,11 +3,11 @@ include(Compiler/GHS)
|
||||||
set(CMAKE_CXX_VERBOSE_FLAG "-v")
|
set(CMAKE_CXX_VERBOSE_FLAG "-v")
|
||||||
set(CMAKE_CXX_OUTPUT_EXTENSION ".o")
|
set(CMAKE_CXX_OUTPUT_EXTENSION ".o")
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS_INIT "")
|
string(APPEND CMAKE_CXX_FLAGS_INIT " ")
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG_INIT "-Odebug -g")
|
string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT " -Odebug -g")
|
||||||
set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Ospace")
|
string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " -Ospace")
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE_INIT "-O")
|
string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -O")
|
||||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O -g")
|
string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT " -O -g")
|
||||||
|
|
||||||
set(CMAKE_CXX_GHS_KERNEL_FLAGS_DEBUG_INIT
|
set(CMAKE_CXX_GHS_KERNEL_FLAGS_DEBUG_INIT
|
||||||
"-ldebug ${CMAKE_CXX_FLAGS_DEBUG_INIT}")
|
"-ldebug ${CMAKE_CXX_FLAGS_DEBUG_INIT}")
|
||||||
|
|
|
@ -5,8 +5,8 @@ set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-ffixed-form")
|
||||||
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-ffree-form")
|
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-ffree-form")
|
||||||
|
|
||||||
# No -DNDEBUG for Fortran.
|
# No -DNDEBUG for Fortran.
|
||||||
set(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-Os")
|
string(APPEND CMAKE_Fortran_FLAGS_MINSIZEREL_INIT " -Os")
|
||||||
set(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3")
|
string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -O3")
|
||||||
|
|
||||||
# No -isystem for Fortran because it will not find .mod files.
|
# No -isystem for Fortran because it will not find .mod files.
|
||||||
unset(CMAKE_INCLUDE_SYSTEM_FLAG_Fortran)
|
unset(CMAKE_INCLUDE_SYSTEM_FLAG_Fortran)
|
||||||
|
|
|
@ -45,11 +45,11 @@ macro(__compiler_gnu lang)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Initial configuration flags.
|
# Initial configuration flags.
|
||||||
set(CMAKE_${lang}_FLAGS_INIT "")
|
string(APPEND CMAKE_${lang}_FLAGS_INIT " ")
|
||||||
set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-g")
|
string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g")
|
||||||
set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
|
string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -Os -DNDEBUG")
|
||||||
set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
|
string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O3 -DNDEBUG")
|
||||||
set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG")
|
string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -g -DNDEBUG")
|
||||||
set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
|
set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
|
||||||
set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
|
set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
|
||||||
if(NOT APPLE OR NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4) # work around #4462
|
if(NOT APPLE OR NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4) # work around #4462
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
set(CMAKE_ASM_VERBOSE_FLAG "-v")
|
include(Compiler/Intel)
|
||||||
|
__compiler_intel(ASM)
|
||||||
|
|
||||||
set(CMAKE_ASM_FLAGS_INIT "")
|
string(APPEND CMAKE_ASM_FLAGS_MINSIZEREL_INIT " -DNDEBUG")
|
||||||
set(CMAKE_ASM_FLAGS_DEBUG_INIT "-g")
|
string(APPEND CMAKE_ASM_FLAGS_RELEASE_INIT " -DNDEBUG")
|
||||||
set(CMAKE_ASM_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
|
string(APPEND CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT " -DNDEBUG")
|
||||||
set(CMAKE_ASM_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
|
|
||||||
set(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG")
|
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;S)
|
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;S)
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
set(CMAKE_C_VERBOSE_FLAG "-v")
|
include(Compiler/Intel)
|
||||||
|
__compiler_intel(C)
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS_INIT "")
|
string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -DNDEBUG")
|
||||||
set(CMAKE_C_FLAGS_DEBUG_INIT "-g")
|
string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -DNDEBUG")
|
||||||
set(CMAKE_C_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
|
string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO_INIT " -DNDEBUG")
|
||||||
set(CMAKE_C_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
|
|
||||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG")
|
|
||||||
|
|
||||||
set(CMAKE_DEPFILE_FLAGS_C "-MD -MT <OBJECT> -MF <DEPFILE>")
|
set(CMAKE_DEPFILE_FLAGS_C "-MD -MT <OBJECT> -MF <DEPFILE>")
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
set(CMAKE_CXX_VERBOSE_FLAG "-v")
|
include(Compiler/Intel)
|
||||||
|
__compiler_intel(CXX)
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS_INIT "")
|
string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " -DNDEBUG")
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
|
string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -DNDEBUG")
|
||||||
set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
|
string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT " -DNDEBUG")
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
|
|
||||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG")
|
|
||||||
|
|
||||||
set(CMAKE_DEPFILE_FLAGS_CXX "-MD -MT <OBJECT> -MF <DEPFILE>")
|
set(CMAKE_DEPFILE_FLAGS_CXX "-MD -MT <OBJECT> -MF <DEPFILE>")
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
set(CMAKE_Fortran_FLAGS_INIT "")
|
include(Compiler/Intel)
|
||||||
set(CMAKE_Fortran_FLAGS_DEBUG_INIT "-g")
|
__compiler_intel(Fortran)
|
||||||
set(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-Os")
|
|
||||||
set(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3")
|
|
||||||
set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
|
|
||||||
set(CMAKE_Fortran_MODDIR_FLAG "-module ")
|
set(CMAKE_Fortran_MODDIR_FLAG "-module ")
|
||||||
set(CMAKE_Fortran_VERBOSE_FLAG "-v")
|
|
||||||
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-fixed")
|
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-fixed")
|
||||||
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-free")
|
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-free")
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Copyright 2002-2016 Kitware, Inc.
|
||||||
|
#
|
||||||
|
# Distributed under the OSI-approved BSD License (the "License");
|
||||||
|
# see accompanying file Copyright.txt for details.
|
||||||
|
#
|
||||||
|
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||||
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
# See the License for more information.
|
||||||
|
#=============================================================================
|
||||||
|
# (To distribute this file outside of CMake, substitute the full
|
||||||
|
# License text for the above reference.)
|
||||||
|
|
||||||
|
# This module is shared by multiple languages; use include blocker.
|
||||||
|
if(__COMPILER_INTEL)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
set(__COMPILER_INTEL 1)
|
||||||
|
|
||||||
|
if(CMAKE_HOST_WIN32)
|
||||||
|
# MSVC-like
|
||||||
|
macro(__compiler_intel lang)
|
||||||
|
endmacro()
|
||||||
|
else()
|
||||||
|
# GNU-like
|
||||||
|
macro(__compiler_intel lang)
|
||||||
|
set(CMAKE_${lang}_VERBOSE_FLAG "-v")
|
||||||
|
|
||||||
|
string(APPEND CMAKE_${lang}_FLAGS_INIT " ")
|
||||||
|
string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g")
|
||||||
|
string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -Os")
|
||||||
|
string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O3")
|
||||||
|
string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -g")
|
||||||
|
endmacro()
|
||||||
|
endif()
|
|
@ -1,4 +1,4 @@
|
||||||
include(Compiler/PGI)
|
include(Compiler/PGI)
|
||||||
__compiler_pgi(C)
|
__compiler_pgi(C)
|
||||||
set(CMAKE_C_FLAGS_MINSIZEREL_INIT "${CMAKE_C_FLAGS_MINSIZEREL_INIT} -DNDEBUG")
|
string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -DNDEBUG")
|
||||||
set(CMAKE_C_FLAGS_RELEASE_INIT "${CMAKE_C_FLAGS_RELEASE_INIT} -DNDEBUG")
|
string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -DNDEBUG")
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
include(Compiler/PGI)
|
include(Compiler/PGI)
|
||||||
__compiler_pgi(CXX)
|
__compiler_pgi(CXX)
|
||||||
set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "${CMAKE_CXX_FLAGS_MINSIZEREL_INIT} -DNDEBUG")
|
string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " -DNDEBUG")
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE_INIT "${CMAKE_CXX_FLAGS_RELEASE_INIT} -DNDEBUG")
|
string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -DNDEBUG")
|
||||||
|
|
|
@ -4,7 +4,7 @@ __compiler_pgi(Fortran)
|
||||||
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-Mnofreeform")
|
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-Mnofreeform")
|
||||||
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-Mfreeform")
|
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-Mfreeform")
|
||||||
|
|
||||||
set(CMAKE_Fortran_FLAGS_INIT "${CMAKE_Fortran_FLAGS_INIT} -Mpreprocess -Kieee")
|
string(APPEND CMAKE_Fortran_FLAGS_INIT " -Mpreprocess -Kieee")
|
||||||
set(CMAKE_Fortran_FLAGS_DEBUG_INIT "${CMAKE_Fortran_FLAGS_DEBUG_INIT} -Mbounds")
|
string(APPEND CMAKE_Fortran_FLAGS_DEBUG_INIT " -Mbounds")
|
||||||
|
|
||||||
set(CMAKE_Fortran_MODDIR_FLAG "-module ")
|
set(CMAKE_Fortran_MODDIR_FLAG "-module ")
|
||||||
|
|
|
@ -23,11 +23,11 @@ macro(__compiler_pgi lang)
|
||||||
set(CMAKE_${lang}_VERBOSE_FLAG "-v")
|
set(CMAKE_${lang}_VERBOSE_FLAG "-v")
|
||||||
|
|
||||||
# Initial configuration flags.
|
# Initial configuration flags.
|
||||||
set(CMAKE_${lang}_FLAGS_INIT "")
|
string(APPEND CMAKE_${lang}_FLAGS_INIT " ")
|
||||||
set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-g -O0")
|
string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g -O0")
|
||||||
set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "-O2 -s")
|
string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -O2 -s")
|
||||||
set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-fast -O3 -Mipa=fast")
|
string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -fast -O3 -Mipa=fast")
|
||||||
set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-O2 -gopt")
|
string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -gopt")
|
||||||
|
|
||||||
# Preprocessing and assembly rules.
|
# Preprocessing and assembly rules.
|
||||||
set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
|
set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
include(Compiler/PathScale)
|
include(Compiler/PathScale)
|
||||||
__compiler_pathscale(C)
|
__compiler_pathscale(C)
|
||||||
set(CMAKE_C_FLAGS_MINSIZEREL_INIT "${CMAKE_C_FLAGS_MINSIZEREL_INIT} -DNDEBUG")
|
string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -DNDEBUG")
|
||||||
set(CMAKE_C_FLAGS_RELEASE_INIT "${CMAKE_C_FLAGS_RELEASE_INIT} -DNDEBUG")
|
string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -DNDEBUG")
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
include(Compiler/PathScale)
|
include(Compiler/PathScale)
|
||||||
__compiler_pathscale(CXX)
|
__compiler_pathscale(CXX)
|
||||||
set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "${CMAKE_CXX_FLAGS_MINSIZEREL_INIT} -DNDEBUG")
|
string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " -DNDEBUG")
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE_INIT "${CMAKE_CXX_FLAGS_RELEASE_INIT} -DNDEBUG")
|
string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -DNDEBUG")
|
||||||
|
|
|
@ -23,9 +23,9 @@ macro(__compiler_pathscale lang)
|
||||||
set(CMAKE_${lang}_VERBOSE_FLAG "-v")
|
set(CMAKE_${lang}_VERBOSE_FLAG "-v")
|
||||||
|
|
||||||
# Initial configuration flags.
|
# Initial configuration flags.
|
||||||
set(CMAKE_${lang}_FLAGS_INIT "")
|
string(APPEND CMAKE_${lang}_FLAGS_INIT " ")
|
||||||
set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-g -O0")
|
string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g -O0")
|
||||||
set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "-Os")
|
string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -Os")
|
||||||
set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-O3")
|
string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O3")
|
||||||
set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-g -O2")
|
string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -g -O2")
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
|
@ -8,11 +8,11 @@ set(CMAKE_SHARED_LIBRARY_RUNTIME_ASM_FLAG "-R")
|
||||||
set(CMAKE_SHARED_LIBRARY_RUNTIME_ASM_FLAG_SEP ":")
|
set(CMAKE_SHARED_LIBRARY_RUNTIME_ASM_FLAG_SEP ":")
|
||||||
set(CMAKE_SHARED_LIBRARY_SONAME_ASM_FLAG "-h")
|
set(CMAKE_SHARED_LIBRARY_SONAME_ASM_FLAG "-h")
|
||||||
|
|
||||||
set(CMAKE_ASM_FLAGS_INIT "")
|
string(APPEND CMAKE_ASM_FLAGS_INIT " ")
|
||||||
set(CMAKE_ASM_FLAGS_DEBUG_INIT "-g")
|
string(APPEND CMAKE_ASM_FLAGS_DEBUG_INIT " -g")
|
||||||
set(CMAKE_ASM_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG")
|
string(APPEND CMAKE_ASM_FLAGS_MINSIZEREL_INIT " -xO2 -xspace -DNDEBUG")
|
||||||
set(CMAKE_ASM_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG")
|
string(APPEND CMAKE_ASM_FLAGS_RELEASE_INIT " -xO3 -DNDEBUG")
|
||||||
set(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-g -xO2 -DNDEBUG")
|
string(APPEND CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT " -g -xO2 -DNDEBUG")
|
||||||
|
|
||||||
# Initialize ASM link type selection flags. These flags are used when
|
# Initialize ASM link type selection flags. These flags are used when
|
||||||
# building a shared library, shared module, or executable that links
|
# building a shared library, shared module, or executable that links
|
||||||
|
|
|
@ -7,11 +7,11 @@ set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-R")
|
||||||
set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
|
set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
|
||||||
set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-h")
|
set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-h")
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS_INIT "")
|
string(APPEND CMAKE_C_FLAGS_INIT " ")
|
||||||
set(CMAKE_C_FLAGS_DEBUG_INIT "-g")
|
string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " -g")
|
||||||
set(CMAKE_C_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG")
|
string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -xO2 -xspace -DNDEBUG")
|
||||||
set(CMAKE_C_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG")
|
string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -xO3 -DNDEBUG")
|
||||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-g -xO2 -DNDEBUG")
|
string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO_INIT " -g -xO2 -DNDEBUG")
|
||||||
|
|
||||||
# Initialize C link type selection flags. These flags are used when
|
# Initialize C link type selection flags. These flags are used when
|
||||||
# building a shared library, shared module, or executable that links
|
# building a shared library, shared module, or executable that links
|
||||||
|
|
|
@ -7,11 +7,11 @@ set(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-R")
|
||||||
set(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP ":")
|
set(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP ":")
|
||||||
set(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-h")
|
set(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-h")
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS_INIT "")
|
string(APPEND CMAKE_CXX_FLAGS_INIT " ")
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
|
string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT " -g")
|
||||||
set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG")
|
string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " -xO2 -xspace -DNDEBUG")
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG")
|
string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -xO3 -DNDEBUG")
|
||||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-g -xO2 -DNDEBUG")
|
string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT " -g -xO2 -DNDEBUG")
|
||||||
|
|
||||||
# Initialize C link type selection flags. These flags are used when
|
# Initialize C link type selection flags. These flags are used when
|
||||||
# building a shared library, shared module, or executable that links
|
# building a shared library, shared module, or executable that links
|
||||||
|
|
|
@ -10,11 +10,11 @@ set(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ":")
|
||||||
set(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "-h")
|
set(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "-h")
|
||||||
set(CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG "-R")
|
set(CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG "-R")
|
||||||
|
|
||||||
set(CMAKE_Fortran_FLAGS_INIT "")
|
string(APPEND CMAKE_Fortran_FLAGS_INIT " ")
|
||||||
set(CMAKE_Fortran_FLAGS_DEBUG_INIT "-g")
|
string(APPEND CMAKE_Fortran_FLAGS_DEBUG_INIT " -g")
|
||||||
set(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG")
|
string(APPEND CMAKE_Fortran_FLAGS_MINSIZEREL_INIT " -xO2 -xspace -DNDEBUG")
|
||||||
set(CMAKE_Fortran_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG")
|
string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -xO3 -DNDEBUG")
|
||||||
set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-g -xO2 -DNDEBUG")
|
string(APPEND CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT " -g -xO2 -DNDEBUG")
|
||||||
set(CMAKE_Fortran_MODDIR_FLAG "-moddir=")
|
set(CMAKE_Fortran_MODDIR_FLAG "-moddir=")
|
||||||
set(CMAKE_Fortran_MODPATH_FLAG "-M")
|
set(CMAKE_Fortran_MODPATH_FLAG "-M")
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared")
|
set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared")
|
||||||
|
|
||||||
# no optimization in tcc:
|
# no optimization in tcc:
|
||||||
set (CMAKE_C_FLAGS_INIT "")
|
string(APPEND CMAKE_C_FLAGS_INIT " ")
|
||||||
set (CMAKE_C_FLAGS_DEBUG_INIT "-g")
|
string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " -g")
|
||||||
set (CMAKE_C_FLAGS_MINSIZEREL_INIT "-DNDEBUG")
|
string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -DNDEBUG")
|
||||||
set (CMAKE_C_FLAGS_RELEASE_INIT "-DNDEBUG")
|
string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -DNDEBUG")
|
||||||
set (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-g -DNDEBUG")
|
string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO_INIT " -g -DNDEBUG")
|
||||||
|
|
|
@ -2,11 +2,11 @@ set(CMAKE_ASM_VERBOSE_FLAG "-V")
|
||||||
|
|
||||||
# -qthreaded = Ensures that all optimizations will be thread-safe
|
# -qthreaded = Ensures that all optimizations will be thread-safe
|
||||||
# -qhalt=e = Halt on error messages (rather than just severe errors)
|
# -qhalt=e = Halt on error messages (rather than just severe errors)
|
||||||
set(CMAKE_ASM_FLAGS_INIT "-qthreaded -qhalt=e -qsourcetype=assembler")
|
string(APPEND CMAKE_ASM_FLAGS_INIT " -qthreaded -qhalt=e -qsourcetype=assembler")
|
||||||
|
|
||||||
set(CMAKE_ASM_FLAGS_DEBUG_INIT "-g")
|
string(APPEND CMAKE_ASM_FLAGS_DEBUG_INIT " -g")
|
||||||
set(CMAKE_ASM_FLAGS_RELEASE_INIT "-O -DNDEBUG")
|
string(APPEND CMAKE_ASM_FLAGS_RELEASE_INIT " -O -DNDEBUG")
|
||||||
set(CMAKE_ASM_FLAGS_MINSIZEREL_INIT "-O -DNDEBUG")
|
string(APPEND CMAKE_ASM_FLAGS_MINSIZEREL_INIT " -O -DNDEBUG")
|
||||||
set(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-g -DNDEBUG")
|
string(APPEND CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT " -g -DNDEBUG")
|
||||||
|
|
||||||
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s )
|
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s )
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
include(Compiler/XL)
|
include(Compiler/XL)
|
||||||
__compiler_xl(C)
|
__compiler_xl(C)
|
||||||
set(CMAKE_C_FLAGS_RELEASE_INIT "${CMAKE_C_FLAGS_RELEASE_INIT} -DNDEBUG")
|
string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -DNDEBUG")
|
||||||
set(CMAKE_C_FLAGS_MINSIZEREL_INIT "${CMAKE_C_FLAGS_MINSIZEREL_INIT} -DNDEBUG")
|
string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -DNDEBUG")
|
||||||
|
|
||||||
# -qthreaded = Ensures that all optimizations will be thread-safe
|
# -qthreaded = Ensures that all optimizations will be thread-safe
|
||||||
# -qhalt=e = Halt on error messages (rather than just severe errors)
|
# -qhalt=e = Halt on error messages (rather than just severe errors)
|
||||||
set(CMAKE_C_FLAGS_INIT "-qthreaded -qhalt=e")
|
string(APPEND CMAKE_C_FLAGS_INIT " -qthreaded -qhalt=e")
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
include(Compiler/XL)
|
include(Compiler/XL)
|
||||||
__compiler_xl(CXX)
|
__compiler_xl(CXX)
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE_INIT "${CMAKE_CXX_FLAGS_RELEASE_INIT} -DNDEBUG")
|
string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -DNDEBUG")
|
||||||
set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "${CMAKE_CXX_FLAGS_MINSIZEREL_INIT} -DNDEBUG")
|
string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " -DNDEBUG")
|
||||||
|
|
||||||
# -qthreaded = Ensures that all optimizations will be thread-safe
|
# -qthreaded = Ensures that all optimizations will be thread-safe
|
||||||
# -qhalt=e = Halt on error messages (rather than just severe errors)
|
# -qhalt=e = Halt on error messages (rather than just severe errors)
|
||||||
set(CMAKE_CXX_FLAGS_INIT "-qthreaded -qhalt=e")
|
string(APPEND CMAKE_CXX_FLAGS_INIT " -qthreaded -qhalt=e")
|
||||||
|
|
||||||
set(CMAKE_CXX_COMPILE_OBJECT
|
set(CMAKE_CXX_COMPILE_OBJECT
|
||||||
"<CMAKE_CXX_COMPILER> -+ <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT> -c <SOURCE>")
|
"<CMAKE_CXX_COMPILER> -+ <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT> -c <SOURCE>")
|
||||||
|
|
|
@ -10,7 +10,7 @@ set(CMAKE_Fortran_DEFINE_FLAG "-WF,-D")
|
||||||
|
|
||||||
# -qthreaded = Ensures that all optimizations will be thread-safe
|
# -qthreaded = Ensures that all optimizations will be thread-safe
|
||||||
# -qhalt=e = Halt on error messages (rather than just severe errors)
|
# -qhalt=e = Halt on error messages (rather than just severe errors)
|
||||||
set(CMAKE_Fortran_FLAGS_INIT "-qthreaded -qhalt=e")
|
string(APPEND CMAKE_Fortran_FLAGS_INIT " -qthreaded -qhalt=e")
|
||||||
|
|
||||||
# xlf: 1501-214 (W) command option E reserved for future use - ignored
|
# xlf: 1501-214 (W) command option E reserved for future use - ignored
|
||||||
set(CMAKE_Fortran_CREATE_PREPROCESSED_SOURCE)
|
set(CMAKE_Fortran_CREATE_PREPROCESSED_SOURCE)
|
||||||
|
|
|
@ -29,10 +29,10 @@ macro(__compiler_xl lang)
|
||||||
set(CMAKE_${lang}_VERBOSE_FLAG "-V")
|
set(CMAKE_${lang}_VERBOSE_FLAG "-V")
|
||||||
set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "-qpic")
|
set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "-qpic")
|
||||||
|
|
||||||
set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-g")
|
string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g")
|
||||||
set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-O")
|
string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O")
|
||||||
set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "-O")
|
string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -O")
|
||||||
set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-g")
|
string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -g")
|
||||||
set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
|
set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
|
||||||
set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
|
set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
# Define ARTOS to select proper behaviour and tell preprocessor to accept C++ style comments.
|
# Define ARTOS to select proper behaviour and tell preprocessor to accept C++ style comments.
|
||||||
set(CMAKE_C_FLAGS_INIT "-DARTOS -Xp -+")
|
string(APPEND CMAKE_C_FLAGS_INIT " -DARTOS -Xp -+")
|
||||||
# ac doesn't support -g properly and doesn't support the normal gcc optimization options. Just use the defaults set by ac.
|
# ac doesn't support -g properly and doesn't support the normal gcc optimization options. Just use the defaults set by ac.
|
||||||
set(CMAKE_C_FLAGS_DEBUG_INIT "")
|
string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " ")
|
||||||
set(CMAKE_C_FLAGS_MINSIZEREL_INIT "-DNDEBUG")
|
string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -DNDEBUG")
|
||||||
set(CMAKE_C_FLAGS_RELEASE_INIT "-DNDEBUG")
|
string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -DNDEBUG")
|
||||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-DNDEBUG")
|
string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO_INIT " -DNDEBUG")
|
||||||
# Most projects expect the stdio functions to be available.
|
# Most projects expect the stdio functions to be available.
|
||||||
set(CMAKE_C_STANDARD_LIBRARIES_INIT "stdio.a")
|
set(CMAKE_C_STANDARD_LIBRARIES_INIT "stdio.a")
|
||||||
|
|
|
@ -4,10 +4,10 @@ include(Platform/Generic-ADSP-Common)
|
||||||
|
|
||||||
set(CMAKE_C_OUTPUT_EXTENSION ".doj")
|
set(CMAKE_C_OUTPUT_EXTENSION ".doj")
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS_DEBUG_INIT "-g")
|
string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " -g")
|
||||||
set(CMAKE_C_FLAGS_MINSIZEREL_INIT "")
|
string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " ")
|
||||||
set(CMAKE_C_FLAGS_RELEASE_INIT "")
|
string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " ")
|
||||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "")
|
string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO_INIT " ")
|
||||||
|
|
||||||
set(CMAKE_C_CREATE_STATIC_LIBRARY
|
set(CMAKE_C_CREATE_STATIC_LIBRARY
|
||||||
"<CMAKE_C_COMPILER> -build-lib -proc ${ADSP_PROCESSOR} -si-revision ${ADSP_PROCESSOR_SILICIUM_REVISION} -o <TARGET> <CMAKE_C_LINK_FLAGS> <OBJECTS>")
|
"<CMAKE_C_COMPILER> -build-lib -proc ${ADSP_PROCESSOR} -si-revision ${ADSP_PROCESSOR_SILICIUM_REVISION} -o <TARGET> <CMAKE_C_LINK_FLAGS> <OBJECTS>")
|
||||||
|
|
|
@ -2,10 +2,10 @@ include(Platform/Generic-ADSP-Common)
|
||||||
|
|
||||||
set(CMAKE_CXX_OUTPUT_EXTENSION ".doj")
|
set(CMAKE_CXX_OUTPUT_EXTENSION ".doj")
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
|
string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT " -g")
|
||||||
set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "")
|
string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " ")
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE_INIT "")
|
string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " ")
|
||||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "")
|
string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT " ")
|
||||||
|
|
||||||
set(CMAKE_CXX_CREATE_STATIC_LIBRARY
|
set(CMAKE_CXX_CREATE_STATIC_LIBRARY
|
||||||
"<CMAKE_CXX_COMPILER> -build-lib -proc ${ADSP_PROCESSOR} -si-revision ${ADSP_PROCESSOR_SILICIUM_REVISION} -o <TARGET> <CMAKE_CXX_LINK_FLAGS> <OBJECTS>")
|
"<CMAKE_CXX_COMPILER> -build-lib -proc ${ADSP_PROCESSOR} -si-revision ${ADSP_PROCESSOR_SILICIUM_REVISION} -o <TARGET> <CMAKE_CXX_LINK_FLAGS> <OBJECTS>")
|
||||||
|
|
|
@ -30,7 +30,7 @@ set(CMAKE_AR "${SDCCLIB_EXECUTABLE}" CACHE FILEPATH "The sdcc librarian" FORCE)
|
||||||
|
|
||||||
# CMAKE_C_FLAGS_INIT and CMAKE_EXE_LINKER_FLAGS_INIT should be set in a CMAKE_SYSTEM_PROCESSOR file
|
# CMAKE_C_FLAGS_INIT and CMAKE_EXE_LINKER_FLAGS_INIT should be set in a CMAKE_SYSTEM_PROCESSOR file
|
||||||
if(NOT DEFINED CMAKE_C_FLAGS_INIT)
|
if(NOT DEFINED CMAKE_C_FLAGS_INIT)
|
||||||
set(CMAKE_C_FLAGS_INIT "-mmcs51 --model-small")
|
string(APPEND CMAKE_C_FLAGS_INIT " -mmcs51 --model-small")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT DEFINED CMAKE_EXE_LINKER_FLAGS_INIT)
|
if(NOT DEFINED CMAKE_EXE_LINKER_FLAGS_INIT)
|
||||||
|
|
|
@ -8,7 +8,7 @@ set(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE
|
||||||
"rm -f `basename \"<SOURCE>\" | sed 's/\\.[^./]*$$//'`.o"
|
"rm -f `basename \"<SOURCE>\" | sed 's/\\.[^./]*$$//'`.o"
|
||||||
)
|
)
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
|
string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT " -g")
|
||||||
set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "+O3 -DNDEBUG")
|
string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " +O3 -DNDEBUG")
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE_INIT "+O2 -DNDEBUG")
|
string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " +O2 -DNDEBUG")
|
||||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-g")
|
string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT " -g")
|
||||||
|
|
|
@ -27,7 +27,7 @@ macro(__hpux_compiler_hp lang)
|
||||||
set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":")
|
set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":")
|
||||||
set(CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG "-Wl,+h")
|
set(CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG "-Wl,+h")
|
||||||
|
|
||||||
set(CMAKE_${lang}_FLAGS_INIT "")
|
string(APPEND CMAKE_${lang}_FLAGS_INIT " ")
|
||||||
|
|
||||||
set(CMAKE_${lang}_LINK_FLAGS "-Wl,+s,+nodefaultrpath")
|
set(CMAKE_${lang}_LINK_FLAGS "-Wl,+s,+nodefaultrpath")
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
|
@ -132,10 +132,10 @@ macro(__embarcadero_language lang)
|
||||||
)
|
)
|
||||||
|
|
||||||
# Initial configuration flags.
|
# Initial configuration flags.
|
||||||
set(CMAKE_${lang}_FLAGS_INIT "${_tM}")
|
string(APPEND CMAKE_${lang}_FLAGS_INIT " ${_tM}")
|
||||||
set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-Od -v")
|
string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -Od -v")
|
||||||
set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "-O1 -DNDEBUG")
|
string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -O1 -DNDEBUG")
|
||||||
set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
|
string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O2 -DNDEBUG")
|
||||||
set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-Od")
|
string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -Od")
|
||||||
set(CMAKE_${lang}_STANDARD_LIBRARIES_INIT "import32.lib")
|
set(CMAKE_${lang}_STANDARD_LIBRARIES_INIT "import32.lib")
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
|
@ -4,8 +4,8 @@ set(_COMPILE_Fortran " /fpp")
|
||||||
set(CMAKE_Fortran_MODDIR_FLAG "-module:")
|
set(CMAKE_Fortran_MODDIR_FLAG "-module:")
|
||||||
set(CMAKE_Fortran_STANDARD_LIBRARIES_INIT "user32.lib")
|
set(CMAKE_Fortran_STANDARD_LIBRARIES_INIT "user32.lib")
|
||||||
__windows_compiler_intel(Fortran)
|
__windows_compiler_intel(Fortran)
|
||||||
set (CMAKE_Fortran_FLAGS_INIT "/W1 /nologo /fpp /libs:dll /threads")
|
string(APPEND CMAKE_Fortran_FLAGS_INIT " /W1 /nologo /fpp /libs:dll /threads")
|
||||||
set (CMAKE_Fortran_FLAGS_DEBUG_INIT "/Od /debug:full /dbglibs")
|
string(APPEND CMAKE_Fortran_FLAGS_DEBUG_INIT " /Od /debug:full /dbglibs")
|
||||||
set (CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "/O1 /DNDEBUG")
|
string(APPEND CMAKE_Fortran_FLAGS_MINSIZEREL_INIT " /O1 /DNDEBUG")
|
||||||
set (CMAKE_Fortran_FLAGS_RELEASE_INIT "/O2 /DNDEBUG")
|
string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " /O2 /DNDEBUG")
|
||||||
set (CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "/O2 /debug:full /DNDEBUG")
|
string(APPEND CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT " /O2 /debug:full /DNDEBUG")
|
||||||
|
|
|
@ -298,20 +298,23 @@ macro(__windows_compiler_msvc lang)
|
||||||
set(CMAKE_${lang}_LINK_EXECUTABLE
|
set(CMAKE_${lang}_LINK_EXECUTABLE
|
||||||
"${_CMAKE_VS_LINK_EXE}<CMAKE_LINKER> ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE} /out:<TARGET> /implib:<TARGET_IMPLIB> /pdb:<TARGET_PDB> /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR>${_PLATFORM_LINK_FLAGS} <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}")
|
"${_CMAKE_VS_LINK_EXE}<CMAKE_LINKER> ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE} /out:<TARGET> /implib:<TARGET_IMPLIB> /pdb:<TARGET_PDB> /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR>${_PLATFORM_LINK_FLAGS} <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}")
|
||||||
|
|
||||||
if(CMAKE_VS_PLATFORM_TOOLSET MATCHES "v[0-9]+_clang_.*")
|
if("x${lang}" STREQUAL "xC" OR
|
||||||
# note: MSVC 14 2015 Update 1 sets -fno-ms-compatibility by default, but this does not allow one to compile many projects
|
"x${lang}" STREQUAL "xCXX")
|
||||||
# that include MS's own headers. CMake itself is affected project too.
|
if(CMAKE_VS_PLATFORM_TOOLSET MATCHES "v[0-9]+_clang_.*")
|
||||||
set(CMAKE_${lang}_FLAGS_INIT "${_PLATFORM_DEFINES}${_PLATFORM_DEFINES_${lang}} -fms-extensions -fms-compatibility -D_WINDOWS -Wall${_FLAGS_${lang}}")
|
# note: MSVC 14 2015 Update 1 sets -fno-ms-compatibility by default, but this does not allow one to compile many projects
|
||||||
set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-D_DEBUG /MDd -gline-tables-only -fno-inline -O0 ${_RTC1}")
|
# that include MS's own headers. CMake itself is affected project too.
|
||||||
set(CMAKE_${lang}_FLAGS_RELEASE_INIT "/MD -O2 -DNDEBUG")
|
string(APPEND CMAKE_${lang}_FLAGS_INIT " ${_PLATFORM_DEFINES}${_PLATFORM_DEFINES_${lang}} -fms-extensions -fms-compatibility -D_WINDOWS -Wall${_FLAGS_${lang}}")
|
||||||
set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "/MD -gline-tables-only -O2 -fno-inline -DNDEBUG")
|
string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -D_DEBUG /MDd -gline-tables-only -fno-inline -O0 ${_RTC1}")
|
||||||
set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "/MD -DNDEBUG") # TODO: Add '-Os' once VS generator maps it properly for Clang
|
string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " /MD -O2 -DNDEBUG")
|
||||||
else()
|
string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " /MD -gline-tables-only -O2 -fno-inline -DNDEBUG")
|
||||||
set(CMAKE_${lang}_FLAGS_INIT "${_PLATFORM_DEFINES}${_PLATFORM_DEFINES_${lang}} /D_WINDOWS /W3${_FLAGS_${lang}}")
|
string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " /MD -DNDEBUG") # TODO: Add '-Os' once VS generator maps it properly for Clang
|
||||||
set(CMAKE_${lang}_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od ${_RTC1}")
|
else()
|
||||||
set(CMAKE_${lang}_FLAGS_RELEASE_INIT "/MD /O2 /Ob2 /DNDEBUG")
|
string(APPEND CMAKE_${lang}_FLAGS_INIT " ${_PLATFORM_DEFINES}${_PLATFORM_DEFINES_${lang}} /D_WINDOWS /W3${_FLAGS_${lang}}")
|
||||||
set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /Ob1 /DNDEBUG")
|
string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " /D_DEBUG /MDd /Zi /Ob0 /Od ${_RTC1}")
|
||||||
set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "/MD /O1 /Ob1 /DNDEBUG")
|
string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " /MD /O2 /Ob2 /DNDEBUG")
|
||||||
|
string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " /MD /Zi /O2 /Ob1 /DNDEBUG")
|
||||||
|
string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " /MD /O1 /Ob1 /DNDEBUG")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
set(CMAKE_${lang}_LINKER_SUPPORTS_PDB ON)
|
set(CMAKE_${lang}_LINKER_SUPPORTS_PDB ON)
|
||||||
set(CMAKE_NINJA_DEPTYPE_${lang} msvc)
|
set(CMAKE_NINJA_DEPTYPE_${lang} msvc)
|
||||||
|
@ -320,7 +323,7 @@ macro(__windows_compiler_msvc lang)
|
||||||
set(CMAKE_RC_COMPILER_INIT rc)
|
set(CMAKE_RC_COMPILER_INIT rc)
|
||||||
endif()
|
endif()
|
||||||
if(NOT CMAKE_RC_FLAGS_INIT)
|
if(NOT CMAKE_RC_FLAGS_INIT)
|
||||||
set(CMAKE_RC_FLAGS_INIT "${_PLATFORM_DEFINES} ${_PLATFORM_DEFINES_${lang}}")
|
string(APPEND CMAKE_RC_FLAGS_INIT " ${_PLATFORM_DEFINES} ${_PLATFORM_DEFINES_${lang}}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
enable_language(RC)
|
enable_language(RC)
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
include(Platform/Windows-OpenWatcom)
|
|
@ -0,0 +1 @@
|
||||||
|
include(Platform/Windows-OpenWatcom)
|
|
@ -1,3 +1,23 @@
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Copyright 2002-2016 Kitware, Inc.
|
||||||
|
#
|
||||||
|
# Distributed under the OSI-approved BSD License (the "License");
|
||||||
|
# see accompanying file Copyright.txt for details.
|
||||||
|
#
|
||||||
|
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||||
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
# See the License for more information.
|
||||||
|
#=============================================================================
|
||||||
|
# (To distribute this file outside of CMake, substitute the full
|
||||||
|
# License text for the above reference.)
|
||||||
|
|
||||||
|
# This module is shared by multiple languages; use include blocker.
|
||||||
|
if(__WINDOWS_OPENWATCOM)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
set(__WINDOWS_OPENWATCOM 1)
|
||||||
|
|
||||||
set(CMAKE_LIBRARY_PATH_FLAG "libpath ")
|
set(CMAKE_LIBRARY_PATH_FLAG "libpath ")
|
||||||
set(CMAKE_LINK_LIBRARY_FLAG "library ")
|
set(CMAKE_LINK_LIBRARY_FLAG "library ")
|
||||||
set(CMAKE_LINK_LIBRARY_FILE_FLAG "library")
|
set(CMAKE_LINK_LIBRARY_FILE_FLAG "library")
|
||||||
|
@ -32,13 +52,13 @@ set(CMAKE_BUILD_TYPE_INIT Debug)
|
||||||
# single/multi-threaded /-bm
|
# single/multi-threaded /-bm
|
||||||
# static/DLL run-time libraries /-br
|
# static/DLL run-time libraries /-br
|
||||||
# default is setup for multi-threaded + DLL run-time libraries
|
# default is setup for multi-threaded + DLL run-time libraries
|
||||||
set (CMAKE_C_FLAGS_INIT "-bt=nt -w3 -dWIN32 -br -bm")
|
string(APPEND CMAKE_C_FLAGS_INIT " -bt=nt -w3 -dWIN32 -br -bm")
|
||||||
set (CMAKE_CXX_FLAGS_INIT "-bt=nt -xs -w3 -dWIN32 -br -bm")
|
string(APPEND CMAKE_CXX_FLAGS_INIT " -bt=nt -xs -w3 -dWIN32 -br -bm")
|
||||||
foreach(lang C CXX)
|
foreach(lang C CXX)
|
||||||
set (CMAKE_${lang}_FLAGS_DEBUG_INIT "-d2")
|
string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -d2")
|
||||||
set (CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "-s -os -d0 -dNDEBUG")
|
string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -s -os -d0 -dNDEBUG")
|
||||||
set (CMAKE_${lang}_FLAGS_RELEASE_INIT "-s -ot -d0 -dNDEBUG")
|
string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -s -ot -d0 -dNDEBUG")
|
||||||
set (CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-s -ot -d1 -dNDEBUG")
|
string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -s -ot -d1 -dNDEBUG")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
foreach(type CREATE_SHARED_LIBRARY CREATE_SHARED_MODULE LINK_EXECUTABLE)
|
foreach(type CREATE_SHARED_LIBRARY CREATE_SHARED_MODULE LINK_EXECUTABLE)
|
|
@ -0,0 +1 @@
|
||||||
|
include(Platform/Windows-OpenWatcom-C)
|
|
@ -0,0 +1 @@
|
||||||
|
include(Platform/Windows-OpenWatcom-CXX)
|
|
@ -0,0 +1,30 @@
|
||||||
|
-- CMAKE_C_FLAGS='[^
|
||||||
|
]*-DMY_FLAGS_INIT[^
|
||||||
|
]*'
|
||||||
|
-- CMAKE_C_FLAGS_DEBUG='[^
|
||||||
|
]*-DMY_FLAGS_DEBUG_INIT[^
|
||||||
|
]*'
|
||||||
|
-- CMAKE_C_FLAGS_RELEASE='[^
|
||||||
|
]*-DMY_FLAGS_RELEASE_INIT[^
|
||||||
|
]*'
|
||||||
|
-- CMAKE_C_FLAGS_MINSIZEREL='[^
|
||||||
|
]*-DMY_FLAGS_MINSIZEREL_INIT[^
|
||||||
|
]*'
|
||||||
|
-- CMAKE_C_FLAGS_RELWITHDEBINFO='[^
|
||||||
|
]*-DMY_FLAGS_RELWITHDEBINFO_INIT[^
|
||||||
|
]*'
|
||||||
|
-- CMAKE_CXX_FLAGS='[^
|
||||||
|
]*-DMY_FLAGS_INIT[^
|
||||||
|
]*'
|
||||||
|
-- CMAKE_CXX_FLAGS_DEBUG='[^
|
||||||
|
]*-DMY_FLAGS_DEBUG_INIT[^
|
||||||
|
]*'
|
||||||
|
-- CMAKE_CXX_FLAGS_RELEASE='[^
|
||||||
|
]*-DMY_FLAGS_RELEASE_INIT[^
|
||||||
|
]*'
|
||||||
|
-- CMAKE_CXX_FLAGS_MINSIZEREL='[^
|
||||||
|
]*-DMY_FLAGS_MINSIZEREL_INIT[^
|
||||||
|
]*'
|
||||||
|
-- CMAKE_CXX_FLAGS_RELWITHDEBINFO='[^
|
||||||
|
]*-DMY_FLAGS_RELWITHDEBINFO_INIT[^
|
||||||
|
]*'
|
|
@ -0,0 +1,7 @@
|
||||||
|
foreach(lang C CXX)
|
||||||
|
set(CMAKE_${lang}_FLAGS_INIT -DMY_FLAGS_INIT)
|
||||||
|
set(CMAKE_${lang}_FLAGS_DEBUG_INIT -DMY_FLAGS_DEBUG_INIT)
|
||||||
|
set(CMAKE_${lang}_FLAGS_RELEASE_INIT -DMY_FLAGS_RELEASE_INIT)
|
||||||
|
set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT -DMY_FLAGS_MINSIZEREL_INIT)
|
||||||
|
set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT -DMY_FLAGS_RELWITHDEBINFO_INIT)
|
||||||
|
endforeach()
|
|
@ -0,0 +1,7 @@
|
||||||
|
enable_language(C)
|
||||||
|
enable_language(CXX)
|
||||||
|
foreach(lang C CXX)
|
||||||
|
foreach(c "" _DEBUG _RELEASE _MINSIZEREL _RELWITHDEBINFO)
|
||||||
|
message(STATUS "CMAKE_${lang}_FLAGS${c}='${CMAKE_${lang}_FLAGS${c}}'")
|
||||||
|
endforeach()
|
||||||
|
endforeach()
|
|
@ -7,3 +7,4 @@ endfunction()
|
||||||
|
|
||||||
run_cmake_toolchain(CallEnableLanguage)
|
run_cmake_toolchain(CallEnableLanguage)
|
||||||
run_cmake_toolchain(CallProject)
|
run_cmake_toolchain(CallProject)
|
||||||
|
run_cmake_toolchain(FlagsInit)
|
||||||
|
|
Loading…
Reference in New Issue