diff options
author | David Lindauer <touchstone222@runbox.com> | 2023-06-25 01:23:39 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-09-25 16:27:29 (GMT) |
commit | 531b4fe64377b2e2ce5918535df389be0a754b04 (patch) | |
tree | 67d6dca1cb123bb8473aa9542cc7e647bff5efa3 | |
parent | 10f435a58f97a71f6718bfdd0cacb72175a906ef (diff) | |
download | CMake-531b4fe64377b2e2ce5918535df389be0a754b04.zip CMake-531b4fe64377b2e2ce5918535df389be0a754b04.tar.gz CMake-531b4fe64377b2e2ce5918535df389be0a754b04.tar.bz2 |
OrangeC: Add support for OrangeC compiler
Add compiler information modules. Update the test suite.
Fixes: #25032
Co-authored-by: Brad King <brad.king@kitware.com>
57 files changed, 213 insertions, 61 deletions
diff --git a/Help/release/dev/orangec-compiler.rst b/Help/release/dev/orangec-compiler.rst new file mode 100644 index 0000000..9068699 --- /dev/null +++ b/Help/release/dev/orangec-compiler.rst @@ -0,0 +1,5 @@ +orangec-compiler +---------------- + +* The OrangeC compiler is now supported with + :variable:`compiler id <CMAKE_<LANG>_COMPILER_ID>` ``OrangeC``. diff --git a/Help/variable/CMAKE_LANG_COMPILER_ID.rst b/Help/variable/CMAKE_LANG_COMPILER_ID.rst index c89b3ab..6893eea 100644 --- a/Help/variable/CMAKE_LANG_COMPILER_ID.rst +++ b/Help/variable/CMAKE_LANG_COMPILER_ID.rst @@ -35,6 +35,7 @@ Value Name ``MSVC`` `Microsoft Visual Studio`_ ``NVHPC`` `NVIDIA HPC Compiler`_ ``NVIDIA`` `NVIDIA CUDA Compiler`_ +``OrangeC`` `OrangeC Compiler`_ ``OpenWatcom`` `Open Watcom`_ ``PGI`` The Portland Group ``PathScale`` PathScale @@ -63,6 +64,7 @@ languages. .. _NVIDIA HPC Compiler: https://developer.nvidia.com/hpc-compilers .. _NVIDIA CUDA Compiler: https://developer.nvidia.com/cuda-llvm-compiler .. _Open Watcom: https://open-watcom.github.io +.. _OrangeC Compiler: https://github.com/LADSoft/OrangeC .. _Small Device C Compiler: https://sdcc.sourceforge.net .. _Tiny C Compiler: https://bellard.org/tcc .. _Tasking Compiler Toolsets: https://www.tasking.com diff --git a/Modules/CMakeCompilerIdDetection.cmake b/Modules/CMakeCompilerIdDetection.cmake index 3a2b51f..7eb93e2 100644 --- a/Modules/CMakeCompilerIdDetection.cmake +++ b/Modules/CMakeCompilerIdDetection.cmake @@ -72,6 +72,7 @@ function(compiler_id_detection outvar lang) Fujitsu GHS Tasking + OrangeC ) if ("x${lang}" STREQUAL "xC") list(APPEND ordered_compilers diff --git a/Modules/CMakeDetermineASMCompiler.cmake b/Modules/CMakeDetermineASMCompiler.cmake index 8ec6c66..6d7d17e 100644 --- a/Modules/CMakeDetermineASMCompiler.cmake +++ b/Modules/CMakeDetermineASMCompiler.cmake @@ -70,6 +70,10 @@ if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID) set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_ARMClang "--version") set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_ARMClang "armclang") + list(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS OrangeC ) + set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_OrangeC "--version") + set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_OrangeC "occ \\(OrangeC\\) Version") + list(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS HP ) set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_HP "-V") set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_HP "HP C") diff --git a/Modules/Compiler/OrangeC-ASM.cmake b/Modules/Compiler/OrangeC-ASM.cmake new file mode 100644 index 0000000..fe78911 --- /dev/null +++ b/Modules/Compiler/OrangeC-ASM.cmake @@ -0,0 +1,7 @@ +include(Compiler/OrangeC) +__compiler_orangec(ASM) + +set(CMAKE_ASM_OUTPUT_EXTENSION ".o") +set(CMAKE_ASM_VERBOSE_FLAG "-yyyyy") + +set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;S;asm;nas) diff --git a/Modules/Compiler/OrangeC-C.cmake b/Modules/Compiler/OrangeC-C.cmake new file mode 100644 index 0000000..15a6476 --- /dev/null +++ b/Modules/Compiler/OrangeC-C.cmake @@ -0,0 +1,20 @@ +include(Compiler/OrangeC) +include(Compiler/CMakeCommonCompilerMacros) + +set(CMAKE_C_OUTPUT_EXTENSION ".o") +set(CMAKE_C_VERBOSE_FLAG "-yyyyy") +set(CMAKE_C_COMPILE_OPTIONS_EXPLICIT_LANGUAGE -x c) + +set(CMAKE_C90_STANDARD_COMPILE_OPTION -std=c89) +set(CMAKE_C90_EXTENSION_COMPILE_OPTION -std=c89) +set(CMAKE_C90_STANDARD__HAS_FULL_SUPPORT ON) +set(CMAKE_C99_STANDARD_COMPILE_OPTION -std=c99) +set(CMAKE_C99_EXTENSION_COMPILE_OPTION -std=c99) +set(CMAKE_C99_STANDARD__HAS_FULL_SUPPORT ON) +set(CMAKE_C11_STANDARD_COMPILE_OPTION -std=c11) +set(CMAKE_C11_EXTENSION_COMPILE_OPTION -std=c11) +set(CMAKE_C11_STANDARD__HAS_FULL_SUPPORT ON) + +__compiler_orangec(C) +#- 6.38 is the earliest version which version info is available in the preprocessor +__compiler_check_default_language_standard(C 6.38 11) diff --git a/Modules/Compiler/OrangeC-CXX.cmake b/Modules/Compiler/OrangeC-CXX.cmake new file mode 100644 index 0000000..3f9d59c --- /dev/null +++ b/Modules/Compiler/OrangeC-CXX.cmake @@ -0,0 +1,25 @@ +include(Compiler/OrangeC) +include(Compiler/CMakeCommonCompilerMacros) + +set(_ORANGEC_COMPILE_CXX " -x c++") +set(CMAKE_CXX_COMPILE_OPTIONS_EXPLICIT_LANGUAGE -x c++) + +set(CMAKE_CXX_OUTPUT_EXTENSION ".o") +set(CMAKE_CXX_VERBOSE_FLAG "-yyyyy") + + + +#- OrangeC is a little lax when accepting compiler version specifications. +# Usually changing the version only changes the value of __cplusplus. +# Also we don't support CXX98 +set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++11") +set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=c++11") +set(CMAKE_CXX11_STANDARD__HAS_FULL_SUPPORT ON) + +set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std=c++14") +set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=c++14") +set(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT ON) + +__compiler_orangec(CXX) +#- 6.38 is the earliest version which version info is available in the preprocessor +__compiler_check_default_language_standard(CXX 6.38 14) diff --git a/Modules/Compiler/OrangeC-DetermineCompiler.cmake b/Modules/Compiler/OrangeC-DetermineCompiler.cmake new file mode 100644 index 0000000..2ecc140 --- /dev/null +++ b/Modules/Compiler/OrangeC-DetermineCompiler.cmake @@ -0,0 +1,7 @@ + +set(_compiler_id_pp_test "defined(__ORANGEC__)") + +set(_compiler_id_version_compute " +# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__ORANGEC_MAJOR__) +# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__ORANGEC_MINOR__) +# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__ORANGEC_PATCHLEVEL__)") diff --git a/Modules/Compiler/OrangeC.cmake b/Modules/Compiler/OrangeC.cmake new file mode 100644 index 0000000..fbb245b --- /dev/null +++ b/Modules/Compiler/OrangeC.cmake @@ -0,0 +1,33 @@ +include_guard() + +macro(__compiler_orangec lang) + if ("x${lang}" MATCHES "^x(C|CXX)$") + set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE "<CMAKE_${lang}_COMPILER> ${_ORANGEC_COMPILE_${lang}} -! <SOURCE> <DEFINES> <INCLUDES> <FLAGS> +i -o <PREPROCESSED_SOURCE>") + set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE "<CMAKE_${lang}_COMPILER> ${_ORANGEC_COMPILE_${lang}} -! <SOURCE> <DEFINES> <INCLUDES> <FLAGS> -S -o <ASSEMBLY_SOURCE>") + endif() + set(CMAKE_${lang}_COMPILE_OBJECT "<CMAKE_${lang}_COMPILER> ${_ORANGEC_COMPILE_${lang}} -! -c <SOURCE> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT>") + unset(_ORANGEC_COMPILE_${lang}) + + set(CMAKE_DEPFILE_FLAGS_${lang} "-MD -MT <DEP_TARGET> -MF <DEP_FILE>") + set(CMAKE_${lang}_DEPFILE_FORMAT gcc) + set(CMAKE_${lang}_DEPENDS_USE_COMPILER TRUE) + + string(APPEND CMAKE_${lang}_FLAGS_INIT " ") + string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g") + string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O2 -DNDEBUG") + string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -O1 -DNDEBUG") + string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -g -DNDEBUG") + + set(CMAKE_${lang}_CREATE_STATIC_LIBRARY + "<CMAKE_${lang}_COMPILER> -! -static -o <TARGET> <LINK_FLAGS> <OBJECTS> ") + set(CMAKE_${lang}_LINK_EXECUTABLE "<CMAKE_${lang}_COMPILER> -! <FLAGS> -o <TARGET> --out-implib <TARGET_IMPLIB> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> <LINK_LIBRARIES>") + set(CMAKE_${lang}_CREATE_SHARED_LIBRARY + "<CMAKE_${lang}_COMPILER> -! <FLAGS> -o <TARGET> --out-implib <TARGET_IMPLIB> <CMAKE_SHARED_LIBRARY_${lang}_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS> <OBJECTS> <LINK_LIBRARIES>") + set(CMAKE_${lang}_CREATE_SHARED_MODULE "${CMAKE_${lang}_CREATE_SHARED_LIBRARY}") + + set(CMAKE_LIBRARY_PATH_FLAG "-L") + set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-! -shared") + + set(CMAKE_${lang}_RESPONSE_FILE_FLAG "@") + set(CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG "@") +endmacro() diff --git a/Modules/Platform/Windows-OrangeC-C.cmake b/Modules/Platform/Windows-OrangeC-C.cmake new file mode 100644 index 0000000..6b7e6b5 --- /dev/null +++ b/Modules/Platform/Windows-OrangeC-C.cmake @@ -0,0 +1,2 @@ +include(Platform/Windows-OrangeC) +__windows_compiler_orangec(C) diff --git a/Modules/Platform/Windows-OrangeC-CXX.cmake b/Modules/Platform/Windows-OrangeC-CXX.cmake new file mode 100644 index 0000000..7de6716 --- /dev/null +++ b/Modules/Platform/Windows-OrangeC-CXX.cmake @@ -0,0 +1,2 @@ +include(Platform/Windows-OrangeC) +__windows_compiler_orangec(CXX) diff --git a/Modules/Platform/Windows-OrangeC.cmake b/Modules/Platform/Windows-OrangeC.cmake new file mode 100644 index 0000000..4f66e0e --- /dev/null +++ b/Modules/Platform/Windows-OrangeC.cmake @@ -0,0 +1,10 @@ +set(CMAKE_LINK_LIBRARY_SUFFIX "") +set(CMAKE_STATIC_LIBRARY_SUFFIX ".l") +set(CMAKE_IMPORT_LIBRARY_SUFFIX ".l") +set(CMAKE_FIND_LIBRARY_PREFIXES "") +set(CMAKE_FIND_LIBRARY_SUFFIXES ".l") + +macro(__windows_compiler_orangec lang) + set(CMAKE_${lang}_CREATE_WIN32_EXE "-Wg") + set(CMAKE_${lang}_CREATE_CONSOLE_EXE "-Wc") +endmacro() diff --git a/Tests/Assembler/CMakeLists.txt b/Tests/Assembler/CMakeLists.txt index 4635f03..56de257 100644 --- a/Tests/Assembler/CMakeLists.txt +++ b/Tests/Assembler/CMakeLists.txt @@ -12,7 +12,7 @@ set(SRCS) # and also generate assembler files from C: if("${CMAKE_GENERATOR}" MATCHES "Makefile|Xcode|Ninja" AND NOT CMAKE_OSX_ARCHITECTURES MATCHES ";") - if((CMAKE_C_COMPILER_ID MATCHES "^(GNU|LCC|Clang|AppleClang|HP|SunPro|XL)$") OR (CMAKE_C_COMPILER_ID MATCHES "Intel" AND UNIX) + if((CMAKE_C_COMPILER_ID MATCHES "^(GNU|LCC|Clang|AppleClang|HP|SunPro|XL|OrangeC)$") OR (CMAKE_C_COMPILER_ID MATCHES "Intel" AND UNIX) AND NOT (CMAKE_C_COMPILER_ID STREQUAL "Clang" AND "x${CMAKE_C_COMPILER_FRONTEND_VARIANT}" STREQUAL "xMSVC")) set(C_FLAGS "${CMAKE_C_FLAGS}") separate_arguments(C_FLAGS) diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index cd9cc17..915c974 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -117,8 +117,8 @@ if(BUILD_TESTING) if(WIN32 OR CYGWIN) set(CMake_TEST_RESOURCES TRUE) endif() - # for borland and watcom there is no resource support - if(WATCOM OR BORLAND) + # For some Windows toolchains there is no resource support. + if(WATCOM OR BORLAND OR CMAKE_C_COMPILER_ID STREQUAL "OrangeC") set(CMake_TEST_RESOURCES FALSE) endif() @@ -2094,7 +2094,10 @@ if(BUILD_TESTING) ) endif() - if(MAKE_SUPPORTS_SPACES AND NOT CMAKE_GENERATOR STREQUAL "Xcode" AND NOT CMAKE_GENERATOR STREQUAL "Watcom WMake") + if(MAKE_SUPPORTS_SPACES + AND NOT CMAKE_GENERATOR STREQUAL "Xcode" + AND NOT CMAKE_GENERATOR STREQUAL "Watcom WMake" + ) add_test(SubDirSpaces ${CMAKE_CTEST_COMMAND} --build-and-test "${CMake_SOURCE_DIR}/Tests/SubDirSpaces" @@ -3000,8 +3003,8 @@ if(BUILD_TESTING) -S "${CMake_BINARY_DIR}/Tests/CTestTestCrash/test.cmake" -V --output-log "${CMake_BINARY_DIR}/Tests/CTestTestCrash/testOutput.log" ) - # with watcom the SEGFAULT is not found, it just fails - if(CMAKE_GENERATOR MATCHES "Watcom WMake") + # With Watcom and OrangeC the SEGFAULT is not found, it just fails + if(CMAKE_GENERATOR MATCHES "Watcom WMake" OR CMAKE_C_COMPILER_ID STREQUAL "OrangeC") set_tests_properties(CTestTestCrash PROPERTIES PASS_REGULAR_EXPRESSION "Failed") else() diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt index 17f4408..d9bb447 100644 --- a/Tests/CompileFeatures/CMakeLists.txt +++ b/Tests/CompileFeatures/CMakeLists.txt @@ -18,7 +18,7 @@ macro(run_test feature lang) endif() endmacro() -if(NOT CMAKE_C_COMPILER_ID MATCHES "^(Cray|PGI|NVHPC|XL|XLClang|IBMClang|IntelLLVM|Fujitsu|FujitsuClang)$") +if(NOT CMAKE_C_COMPILER_ID MATCHES "^(Cray|PGI|NVHPC|XL|XLClang|IBMClang|IntelLLVM|Fujitsu|FujitsuClang|OrangeC)$") get_property(c_features GLOBAL PROPERTY CMAKE_C_KNOWN_FEATURES) list(FILTER c_features EXCLUDE REGEX "^c_std_[0-9][0-9]") foreach(feature ${c_features}) @@ -26,7 +26,7 @@ if(NOT CMAKE_C_COMPILER_ID MATCHES "^(Cray|PGI|NVHPC|XL|XLClang|IBMClang|IntelLL endforeach() endif() -if(NOT CMAKE_CXX_COMPILER_ID MATCHES "^(Cray|PGI|NVHPC|XL|XLClang|IBMClang|IntelLLVM|Fujitsu|FujitsuClang)$") +if(NOT CMAKE_CXX_COMPILER_ID MATCHES "^(Cray|PGI|NVHPC|XL|XLClang|IBMClang|IntelLLVM|Fujitsu|FujitsuClang|OrangeC)$") get_property(cxx_features GLOBAL PROPERTY CMAKE_CXX_KNOWN_FEATURES) list(FILTER cxx_features EXCLUDE REGEX "^cxx_std_[0-9][0-9]") foreach(feature ${cxx_features}) diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt index d3a184d..fcc2471 100644 --- a/Tests/Complex/CMakeLists.txt +++ b/Tests/Complex/CMakeLists.txt @@ -244,6 +244,12 @@ configure_file( ${Complex_SOURCE_DIR}/Library/dummy ${Complex_BINARY_DIR}/Library/dummylib.lib COPYONLY) +if(CMAKE_C_COMPILER_ID STREQUAL "OrangeC") + configure_file( + ${Complex_SOURCE_DIR}/Library/dummy + ${Complex_BINARY_DIR}/Library/dummylib.l + COPYONLY) +endif() foreach (ext ${CMAKE_SHLIB_SUFFIX};.so;.a;.sl ${CMAKE_SHARED_LIBRARY_SUFFIX}.2 ${CMAKE_STATIC_LIBRARY_SUFFIX}.2) diff --git a/Tests/Complex/Executable/CMakeLists.txt b/Tests/Complex/Executable/CMakeLists.txt index ceb6b54..c8668b9 100644 --- a/Tests/Complex/Executable/CMakeLists.txt +++ b/Tests/Complex/Executable/CMakeLists.txt @@ -45,7 +45,7 @@ add_executable(complex.file complex.file.cxx complex_nobuild.cxx if (UNIX) target_link_libraries(complex ${CMAKE_DL_LIBS}) -elseif(NOT BORLAND AND NOT MINGW) +elseif(NOT BORLAND AND NOT MINGW AND NOT CMAKE_C_COMPILER_ID STREQUAL "OrangeC") target_link_libraries(complex rpcrt4.lib) endif () diff --git a/Tests/Complex/Library/CMakeLists.txt b/Tests/Complex/Library/CMakeLists.txt index 9f2d5e1..d216486 100644 --- a/Tests/Complex/Library/CMakeLists.txt +++ b/Tests/Complex/Library/CMakeLists.txt @@ -23,7 +23,7 @@ set(LibrarySources ${LibrarySources} remove(LibrarySources create_file.cxx GENERATED nonexisting_file) add_library(CMakeTestLibrary ${LibrarySources}) -if(WIN32 AND NOT CYGWIN AND NOT BORLAND AND NOT MINGW) +if(WIN32 AND NOT CYGWIN AND NOT BORLAND AND NOT MINGW AND NOT CMAKE_C_COMPILER_ID STREQUAL "OrangeC") target_link_libraries(CMakeTestLibrary debug user32.lib) target_link_libraries(CMakeTestLibrary optimized kernel32.lib) endif() diff --git a/Tests/ComplexOneConfig/CMakeLists.txt b/Tests/ComplexOneConfig/CMakeLists.txt index dd996e1..e4ae6ba 100644 --- a/Tests/ComplexOneConfig/CMakeLists.txt +++ b/Tests/ComplexOneConfig/CMakeLists.txt @@ -231,6 +231,12 @@ configure_file( ${Complex_SOURCE_DIR}/Library/dummy ${Complex_BINARY_DIR}/Library/dummylib.lib COPYONLY) +if(CMAKE_C_COMPILER_ID STREQUAL "OrangeC") + configure_file( + ${Complex_SOURCE_DIR}/Library/dummy + ${Complex_BINARY_DIR}/Library/dummylib.l + COPYONLY) +endif() foreach (ext ${CMAKE_SHLIB_SUFFIX};.so;.a;.sl) configure_file( ${Complex_SOURCE_DIR}/Library/dummy diff --git a/Tests/ComplexOneConfig/Executable/CMakeLists.txt b/Tests/ComplexOneConfig/Executable/CMakeLists.txt index ec76e83..a8ab17b 100644 --- a/Tests/ComplexOneConfig/Executable/CMakeLists.txt +++ b/Tests/ComplexOneConfig/Executable/CMakeLists.txt @@ -45,7 +45,7 @@ add_executable(complex.file complex.file.cxx complex_nobuild.cxx if (UNIX) target_link_libraries(complex ${CMAKE_DL_LIBS}) -elseif(NOT BORLAND AND NOT MINGW) +elseif(NOT BORLAND AND NOT MINGW AND NOT CMAKE_C_COMPILER_ID STREQUAL "OrangeC") target_link_libraries(complex rpcrt4.lib) endif () diff --git a/Tests/ComplexOneConfig/Library/CMakeLists.txt b/Tests/ComplexOneConfig/Library/CMakeLists.txt index 9f2d5e1..d216486 100644 --- a/Tests/ComplexOneConfig/Library/CMakeLists.txt +++ b/Tests/ComplexOneConfig/Library/CMakeLists.txt @@ -23,7 +23,7 @@ set(LibrarySources ${LibrarySources} remove(LibrarySources create_file.cxx GENERATED nonexisting_file) add_library(CMakeTestLibrary ${LibrarySources}) -if(WIN32 AND NOT CYGWIN AND NOT BORLAND AND NOT MINGW) +if(WIN32 AND NOT CYGWIN AND NOT BORLAND AND NOT MINGW AND NOT CMAKE_C_COMPILER_ID STREQUAL "OrangeC") target_link_libraries(CMakeTestLibrary debug user32.lib) target_link_libraries(CMakeTestLibrary optimized kernel32.lib) endif() diff --git a/Tests/ExportImport/Import/install-RUNTIME_DEPENDENCIES/check_installed.cmake b/Tests/ExportImport/Import/install-RUNTIME_DEPENDENCIES/check_installed.cmake index 6a34697..447a5b6 100644 --- a/Tests/ExportImport/Import/install-RUNTIME_DEPENDENCIES/check_installed.cmake +++ b/Tests/ExportImport/Import/install-RUNTIME_DEPENDENCIES/check_installed.cmake @@ -3,7 +3,7 @@ include("${CMAKE_CURRENT_LIST_DIR}/../check_installed.cmake") if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") check_installed([[^lib;lib/libdep8\.so;lib/liblib\.so;subdir;subdir/bin;subdir/bin/exe1;subdir/bin/exe2;subdir/lib;subdir/lib/libdep10\.so;subdir/lib/libdep11\.so;subdir/lib/libdep2\.so\.1;subdir/lib/libdep2\.so\.1\.2\.3;subdir/lib/libdep3\.so;subdir/lib/libdep5\.so;subdir/lib/libdep6\.so;subdir/lib/libdep8\.so;subdir/lib/libdep9\.so;subdir/lib/liblib\.so;subdir/lib/libmod\.so;subdir/lib/libsublib1\.so$]]) elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") - set(_msvc_check [[bin;bin/dep8\.dll;bin/lib\.dll;lib;lib/lib\.lib;subdir;subdir/bin;subdir/bin/dep10\.dll;subdir/bin/dep11\.dll;subdir/bin/dep2\.dll;subdir/bin/dep3\.dll;subdir/bin/dep5\.dll;subdir/bin/dep6\.dll;subdir/bin/dep8\.dll;subdir/bin/dep9\.dll;subdir/bin/exe1\.exe;subdir/bin/exe2\.exe;subdir/bin/lib\.dll;subdir/bin/sublib1\.dll;subdir/lib;subdir/lib/mod\.dll]]) + set(_msvc_check [[bin;bin/dep8\.dll;bin/lib\.dll;lib;lib/lib\.(lib|l);subdir;subdir/bin;subdir/bin/dep10\.dll;subdir/bin/dep11\.dll;subdir/bin/dep2\.dll;subdir/bin/dep3\.dll;subdir/bin/dep5\.dll;subdir/bin/dep6\.dll;subdir/bin/dep8\.dll;subdir/bin/dep9\.dll;subdir/bin/exe1\.exe;subdir/bin/exe2\.exe;subdir/bin/lib\.dll;subdir/bin/sublib1\.dll;subdir/lib;subdir/lib/mod\.dll]]) set(_mingw_check [[bin;bin/libdep8\.dll;bin/liblib\.dll;lib;lib/liblib\.dll\.a;lib/liblib\.lib;subdir;subdir/bin;subdir/bin/exe1\.exe;subdir/bin/exe2\.exe;subdir/bin/libdep10\.dll;subdir/bin/libdep11\.dll;subdir/bin/libdep2\.dll;subdir/bin/libdep3\.dll;subdir/bin/libdep5\.dll;subdir/bin/libdep6\.dll;subdir/bin/libdep8\.dll;subdir/bin/libdep9\.dll;subdir/bin/liblib\.dll;subdir/bin/libsublib1\.dll;subdir/lib;subdir/lib/libmod\.dll]]) check_installed("^(${_msvc_check}|${_mingw_check})$") elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") diff --git a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt index f6a26e7..0f2067a 100644 --- a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt +++ b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt @@ -55,7 +55,7 @@ endmacro() # detailed features tables, not just meta-features if (CMAKE_C_COMPILE_FEATURES) - if (NOT CMAKE_C_COMPILER_ID MATCHES "^(LCC|Cray|CrayClang|PGI|NVHPC|XL|XLClang|IBMClang|IntelLLVM|Fujitsu|FujitsuClang)$") + if (NOT CMAKE_C_COMPILER_ID MATCHES "^(LCC|Cray|CrayClang|PGI|NVHPC|XL|XLClang|IBMClang|IntelLLVM|Fujitsu|FujitsuClang|OrangeC)$") set(C_expected_features ${CMAKE_C_COMPILE_FEATURES}) list(FILTER C_expected_features EXCLUDE REGEX "^c_std_[0-9][0-9]") endif() @@ -98,7 +98,7 @@ if (C_expected_features) endif() if (CMAKE_CXX_COMPILE_FEATURES) - if (NOT CMAKE_CXX_COMPILER_ID MATCHES "^(LCC|Cray|CrayClang|PGI|NVHPC|XL|XLClang|IBMClang|IntelLLVM|Fujitsu|FujitsuClang)$") + if (NOT CMAKE_CXX_COMPILER_ID MATCHES "^(LCC|Cray|CrayClang|PGI|NVHPC|XL|XLClang|IBMClang|IntelLLVM|Fujitsu|FujitsuClang|OrangeC)$") set(CXX_expected_features ${CMAKE_CXX_COMPILE_FEATURES}) list(FILTER CXX_expected_features EXCLUDE REGEX "^cxx_std_[0-9][0-9]") endif() diff --git a/Tests/OutDir/OutDir.cmake b/Tests/OutDir/OutDir.cmake index 2a003b8..c42dc49 100644 --- a/Tests/OutDir/OutDir.cmake +++ b/Tests/OutDir/OutDir.cmake @@ -1,5 +1,5 @@ set(CMAKE_FIND_LIBRARY_PREFIXES "lib" "") -set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".a" ".so" ".sl" ".dylib" ".dll.a") +set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".a" ".so" ".sl" ".dylib" ".dll.a" ".l") find_library(TESTC1_LIB NAMES testc1 testc1_test_debug_postfix diff --git a/Tests/RunCMake/AutoExportDll/RunCMakeTest.cmake b/Tests/RunCMake/AutoExportDll/RunCMakeTest.cmake index 75130f2..9f65219 100644 --- a/Tests/RunCMake/AutoExportDll/RunCMakeTest.cmake +++ b/Tests/RunCMake/AutoExportDll/RunCMakeTest.cmake @@ -10,6 +10,9 @@ unset(RunCMake_TEST_OPTIONS) if(RunCMake_GENERATOR MATCHES "Watcom WMake|Borland Makefiles") return() endif() +if(CMAKE_CXX_COMPILER_ID STREQUAL "OrangeC") + return() +endif() if(RunCMake_GENERATOR MATCHES "Ninja|Visual Studio" AND CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") set(EXPORTS TRUE) diff --git a/Tests/RunCMake/CMP0060/CMP0060-WARN-ON-stderr.txt b/Tests/RunCMake/CMP0060/CMP0060-WARN-ON-stderr.txt index 7230a07..07c17e2 100644 --- a/Tests/RunCMake/CMP0060/CMP0060-WARN-ON-stderr.txt +++ b/Tests/RunCMake/CMP0060/CMP0060-WARN-ON-stderr.txt @@ -6,7 +6,7 @@ Some library files are in directories implicitly searched by the linker when invoked for C: - .*/Tests/RunCMake/CMP0060/CMP0060-WARN-ON-build/lib/(lib)?CMP0060.(a|lib) + .*/Tests/RunCMake/CMP0060/CMP0060-WARN-ON-build/lib/(lib)?CMP0060.(a|lib|l) For compatibility with older versions of CMake, the generated link line will ask the linker to search for these by library name. diff --git a/Tests/RunCMake/CMP0119/RunCMakeTest.cmake b/Tests/RunCMake/CMP0119/RunCMakeTest.cmake index 7395827..2576a28 100644 --- a/Tests/RunCMake/CMP0119/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0119/RunCMakeTest.cmake @@ -8,10 +8,10 @@ function(run_CMP0119 status) endfunction() if(NOT RunCMake_GENERATOR MATCHES "Visual Studio|Xcode" AND - NOT CMAKE_C_COMPILER_ID MATCHES "(Borland|Embarcadero|Watcom)") + NOT CMAKE_C_COMPILER_ID MATCHES "(Borland|Embarcadero|Watcom|OrangeC)") run_CMP0119(WARN) run_CMP0119(OLD) endif() -if((CMAKE_C_COMPILER_ID MATCHES "(GNU|LCC|Clang|MSVC|Borland|Embarcadero|Intel|TI)")) +if((CMAKE_C_COMPILER_ID MATCHES "(GNU|LCC|Clang|MSVC|Borland|Embarcadero|Intel|TI|OrangeC)")) run_CMP0119(NEW) endif() diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 56952e2..fbe3854 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -201,6 +201,7 @@ elseif(CMake_TEST_Qt5) endif() if(CMAKE_GENERATOR MATCHES "Ninja") set(Ninja_ARGS + -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID} -DCMAKE_C_OUTPUT_EXTENSION=${CMAKE_C_OUTPUT_EXTENSION} -DCMAKE_SHARED_LIBRARY_PREFIX=${CMAKE_SHARED_LIBRARY_PREFIX} -DCMAKE_SHARED_LIBRARY_SUFFIX=${CMAKE_SHARED_LIBRARY_SUFFIX}) diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/fileset.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/fileset.json index c4df2ec..f260037 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/fileset.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/fileset.json @@ -16,7 +16,7 @@ "type": "target", "destination": "lib", "paths": [ - "^fileset/((Debug|Release|MinSizeRel|RelWithDebInfo)/)?(lib)?c_headers_1\\.(a|lib)?$" + "^fileset/((Debug|Release|MinSizeRel|RelWithDebInfo)/)?(lib)?c_headers_1\\.(a|lib|l)?$" ], "isExcludeFromAll": null, "isForAllComponents": null, @@ -172,7 +172,7 @@ "type": "target", "destination": "lib", "paths": [ - "^fileset/((Debug|Release|MinSizeRel|RelWithDebInfo)/)?(lib)?c_headers_2\\.(a|lib)?$" + "^fileset/((Debug|Release|MinSizeRel|RelWithDebInfo)/)?(lib)?c_headers_2\\.(a|lib|l)?$" ], "isExcludeFromAll": null, "isForAllComponents": null, diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/top.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/top.json index a35d5e2..b57ab45 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/top.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/top.json @@ -80,7 +80,7 @@ "type": "target", "destination": "lib", "paths": [ - "^((Debug|Release|MinSizeRel|RelWithDebInfo)/)?(lib)?c_shared_lib\\.(lib|dll\\.a)$" + "^((Debug|Release|MinSizeRel|RelWithDebInfo)/)?(lib)?c_shared_lib\\.(dll\\.a|lib|l)$" ], "isExcludeFromAll": null, "isForAllComponents": null, @@ -173,7 +173,7 @@ "type": "target", "destination": "lib", "paths": [ - "^cxx/((Debug|Release|MinSizeRel|RelWithDebInfo)/)?(lib)?cxx_shared_lib\\.(lib|dll\\.a)$" + "^cxx/((Debug|Release|MinSizeRel|RelWithDebInfo)/)?(lib)?cxx_shared_lib\\.(dll\\.a|lib|l)$" ], "isExcludeFromAll": null, "isForAllComponents": null, diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_headers_1.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_headers_1.json index f6cfa9c..faf0eaa 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_headers_1.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_headers_1.json @@ -219,10 +219,10 @@ } ], "folder": null, - "nameOnDisk": "^(lib)?c_headers_1\\.(a|lib)$", + "nameOnDisk": "^(lib)?c_headers_1\\.(a|lib|l)$", "artifacts": [ { - "path": "^fileset/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?c_headers_1\\.(a|lib)$", + "path": "^fileset/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?c_headers_1\\.(a|lib|l)$", "_dllExtra": false } ], diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_headers_2.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_headers_2.json index 591ba4f..b4f2f9d 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_headers_2.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_headers_2.json @@ -71,10 +71,10 @@ } ], "folder": null, - "nameOnDisk": "^(lib)?c_headers_2\\.(a|lib)$", + "nameOnDisk": "^(lib)?c_headers_2\\.(a|lib|l)$", "artifacts": [ { - "path": "^fileset/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?c_headers_2\\.(a|lib)$", + "path": "^fileset/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?c_headers_2\\.(a|lib|l)$", "_dllExtra": false } ], diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_lib.json index dc74fdf..5b58dd1 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_lib.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_lib.json @@ -88,10 +88,10 @@ } ], "folder": null, - "nameOnDisk": "^(lib)?c_lib\\.(a|lib)$", + "nameOnDisk": "^(lib)?c_lib\\.(a|lib|l)$", "artifacts": [ { - "path": "^((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?c_lib\\.(a|lib)$", + "path": "^((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?c_lib\\.(a|lib|l)$", "_dllExtra": false } ], diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_lib.json index 85b5108..8d5faf8 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_lib.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_lib.json @@ -100,7 +100,7 @@ "_dllExtra": false }, { - "path": "^((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?c_shared_lib\\.(dll\\.a|lib)$", + "path": "^((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?c_shared_lib\\.(dll\\.a|lib|l)$", "_dllExtra": true }, { diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_lib.json index 6a51295..2220581 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_lib.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_lib.json @@ -88,10 +88,10 @@ } ], "folder": null, - "nameOnDisk": "^(lib)?c_static_lib\\.(a|lib)$", + "nameOnDisk": "^(lib)?c_static_lib\\.(a|lib|l)$", "artifacts": [ { - "path": "^((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?c_static_lib\\.(a|lib)$", + "path": "^((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?c_static_lib\\.(a|lib|l)$", "_dllExtra": false } ], diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_subdir.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_subdir.json index 362caf9..a5bebcd 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_subdir.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_subdir.json @@ -113,10 +113,10 @@ } ], "folder": null, - "nameOnDisk": "^(lib)?c_subdir\\.(a|lib)$", + "nameOnDisk": "^(lib)?c_subdir\\.(a|lib|l)$", "artifacts": [ { - "path": "^((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?c_subdir\\.(a|lib)$", + "path": "^((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?c_subdir\\.(a|lib|l)$", "_dllExtra": false } ], diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_lib.json index 725cad9..2f8d6ed 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_lib.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_lib.json @@ -64,10 +64,10 @@ } ], "folder": null, - "nameOnDisk": "^(lib)?cxx_lib\\.(a|lib)$", + "nameOnDisk": "^(lib)?cxx_lib\\.(a|lib|l)$", "artifacts": [ { - "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?cxx_lib\\.(a|lib)$", + "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?cxx_lib\\.(a|lib|l)$", "_dllExtra": false } ], diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_lib.json index c92e573..2274e45 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_lib.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_lib.json @@ -76,7 +76,7 @@ "_dllExtra": false }, { - "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?cxx_shared_lib\\.(dll\\.a|lib)$", + "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?cxx_shared_lib\\.(dll\\.a|lib|l)$", "_dllExtra": true }, { diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_lib.json index 38790dd..2f322b0 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_lib.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_lib.json @@ -64,10 +64,10 @@ } ], "folder": null, - "nameOnDisk": "^(lib)?cxx_static_lib\\.(a|lib)$", + "nameOnDisk": "^(lib)?cxx_static_lib\\.(a|lib|l)$", "artifacts": [ { - "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?cxx_static_lib\\.(a|lib)$", + "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?cxx_static_lib\\.(a|lib|l)$", "_dllExtra": false } ], diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/interface_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/interface_exe.json index 93df8a6..5b47814 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/interface_exe.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/interface_exe.json @@ -170,7 +170,7 @@ "_dllExtra": false }, { - "path": "^lib/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?my_interface_exe\\.(dll\\.a|lib)$", + "path": "^lib/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?my_interface_exe\\.(dll\\.a|lib|l)$", "_dllExtra": true }, { diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/shared_framework.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/shared_framework.json index 41b5605..fab6f66 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/shared_framework.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/shared_framework.json @@ -76,7 +76,7 @@ "_dllExtra": false }, { - "path": "^framework/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?shared_framework\\.(dll\\.a|lib)$", + "path": "^framework/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?shared_framework\\.(dll\\.a|lib|l)$", "_dllExtra": true }, { diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/static_framework.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/static_framework.json index 00dd11e..d6cbded 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/static_framework.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/static_framework.json @@ -64,10 +64,10 @@ } ], "folder": null, - "nameOnDisk": "^(lib)?static_framework\\.(a|lib)$", + "nameOnDisk": "^(lib)?static_framework\\.(a|lib|l)$", "artifacts": [ { - "path": "^framework/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?static_framework\\.(a|lib)$", + "path": "^framework/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?static_framework\\.(a|lib|l)$", "_dllExtra": false } ], diff --git a/Tests/RunCMake/GenerateExportHeader/GEH.cmake b/Tests/RunCMake/GenerateExportHeader/GEH.cmake index 3e35aa3..a34708e 100644 --- a/Tests/RunCMake/GenerateExportHeader/GEH.cmake +++ b/Tests/RunCMake/GenerateExportHeader/GEH.cmake @@ -98,7 +98,7 @@ if (WIN32 OR CYGWIN) if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM") AND CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC") set(_platform Win32-Clang) - elseif(MSVC AND COMPILER_HAS_DEPRECATED) + elseif((MSVC OR CMAKE_C_COMPILER_ID STREQUAL "OrangeC") AND COMPILER_HAS_DEPRECATED) set(_platform Win32) elseif(CYGWIN AND COMPILER_HAS_DEPRECATED) set(_platform Cygwin) diff --git a/Tests/RunCMake/Ninja/RunCMakeTest.cmake b/Tests/RunCMake/Ninja/RunCMakeTest.cmake index 6cc6234..69f2587 100644 --- a/Tests/RunCMake/Ninja/RunCMakeTest.cmake +++ b/Tests/RunCMake/Ninja/RunCMakeTest.cmake @@ -348,7 +348,11 @@ if("${ninja_version}" VERSION_LESS 1.6) return() endif() -foreach(ninja_output_path_prefix "sub space" "sub") +set(ninja_output_path_prefixes "sub") +if(NOT CMAKE_C_COMPILER_ID STREQUAL "OrangeC") + list(APPEND ninja_output_path_prefixes "sub space") +endif() +foreach(ninja_output_path_prefix IN LISTS ninja_output_path_prefixes) run_sub_cmake(Executable "${ninja_output_path_prefix}") run_sub_cmake(StaticLib "${ninja_output_path_prefix}") run_sub_cmake(SharedLib "${ninja_output_path_prefix}") diff --git a/Tests/RunCMake/NinjaMultiConfig/CompileCommands-check.cmake b/Tests/RunCMake/NinjaMultiConfig/CompileCommands-check.cmake index 30b24bf..e65be3b 100644 --- a/Tests/RunCMake/NinjaMultiConfig/CompileCommands-check.cmake +++ b/Tests/RunCMake/NinjaMultiConfig/CompileCommands-check.cmake @@ -8,7 +8,7 @@ set(expected_compile_commands ]*", "file": "[^ ]*(/Tests/RunCMake/NinjaMultiConfig/main\.c|\\\\Tests\\\\RunCMake\\\\NinjaMultiConfig\\\\main\.c)", - "output": "(CMakeFiles/exe\.dir/Debug/main\.c\.o|CMakeFiles\\\\exe\.dir\\\\Debug\\\\main\.c\.obj)" + "output": "(CMakeFiles/exe\.dir/Debug/main\.c\.o|CMakeFiles\\\\exe\.dir\\\\Debug\\\\main\.c\.(obj|o))" }, { "directory": "[^ @@ -18,7 +18,7 @@ set(expected_compile_commands ]*", "file": "[^ ]*(/Tests/RunCMake/NinjaMultiConfig/main\.c|\\\\Tests\\\\RunCMake\\\\NinjaMultiConfig\\\\main\.c)", - "output": "(CMakeFiles/exe\.dir/Release/main\.c\.o|CMakeFiles\\\\exe\.dir\\\\Release\\\\main\.c\.obj)" + "output": "(CMakeFiles/exe\.dir/Release/main\.c\.o|CMakeFiles\\\\exe\.dir\\\\Release\\\\main\.c\.(obj|o))" } ]$]==]) diff --git a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake index 7128aaf..a39606d 100644 --- a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake +++ b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake @@ -17,7 +17,7 @@ function(check_files dir) list(SORT expected) file(GLOB_RECURSE actual "${dir}/*") - list(FILTER actual EXCLUDE REGEX "/CMakeFiles/|\\.ninja$|/CMakeCache\\.txt$|/target_files[^/]*\\.cmake$|/\\.ninja_[^/]*$|/cmake_install\\.cmake$|\\.ilk$|\\.manifest$|\\.pdb$|\\.exp$|/install_manifest\\.txt$|/\\.qt/QtDeploySupport[^/]*\\.cmake$") + list(FILTER actual EXCLUDE REGEX "/CMakeFiles/|\\.ninja$|/CMakeCache\\.txt$|/target_files[^/]*\\.cmake$|/\\.ninja_[^/]*$|/cmake_install\\.cmake$|\\.ilk$|\\.manifest$|\\.odx$|\\.pdb$|\\.exp$|/install_manifest\\.txt$|/\\.qt/QtDeploySupport[^/]*\\.cmake$") foreach(f IN LISTS _check_files_INCLUDE _check_files_EXCLUDE) if(EXISTS ${f}) list(APPEND actual ${f}) diff --git a/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-all-target-ninja-stderr.txt b/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-all-target-ninja-stderr.txt index 6db4bcc..ace6512 100644 --- a/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-all-target-ninja-stderr.txt +++ b/Tests/RunCMake/NinjaMultiConfig/SimpleNoCross-all-target-ninja-stderr.txt @@ -1 +1 @@ -^ninja: error: unknown target 'simplestatic:all'$ +^ninja: error: unknown target 'simplestatic:all'(, did you mean 'simplestatic.l'\?)?$ diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-all-check.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-all-check.cmake index 10b7b82..61ab542 100644 --- a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-all-check.cmake +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-all-check.cmake @@ -1,4 +1,4 @@ -if(CMAKE_C_COMPILER_ID STREQUAL "Borland") +if(CMAKE_C_COMPILER_ID MATCHES "^(Borland|OrangeC)$") # Borland upper-cases dll names referenced in import libraries. set(conflict_dll [[CONFLICT\.DLL]]) set(unresolved_dll [[UNRESOLVED\.DLL]]) diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-conflict-all-stderr-OrangeC.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-conflict-all-stderr-OrangeC.txt new file mode 100644 index 0000000..607e4b8 --- /dev/null +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-conflict-all-stderr-OrangeC.txt @@ -0,0 +1,7 @@ +^CMake Error at cmake_install\.cmake:[0-9]+ \(file\): + file Multiple conflicting paths found for PATH\.DLL: + + [^ +]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-conflict-build/root-all/lib/test1/path\.dll + [^ +]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-conflict-build/root-all/lib/test2/path\.dll$ diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-unresolved-all-stderr-OrangeC.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-unresolved-all-stderr-OrangeC.txt new file mode 100644 index 0000000..fea1083 --- /dev/null +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/windows-unresolved-all-stderr-OrangeC.txt @@ -0,0 +1,4 @@ +^CMake Error at cmake_install\.cmake:[0-9]+ \(file\): + file Could not resolve runtime dependencies: + + UNRESOLVED\.DLL$ diff --git a/Tests/RunCMake/install/TARGETS-Defaults-Cache-all-check.cmake b/Tests/RunCMake/install/TARGETS-Defaults-Cache-all-check.cmake index d099469..97b9b5d 100644 --- a/Tests/RunCMake/install/TARGETS-Defaults-Cache-all-check.cmake +++ b/Tests/RunCMake/install/TARGETS-Defaults-Cache-all-check.cmake @@ -1,7 +1,7 @@ if(WIN32) set(_check_files [[lib3]] - [[lib3/(lib)?lib3\.(dll\.a|lib)]] + [[lib3/(lib)?lib3\.(dll\.a|lib|l)]] [[lib4]] [[lib4/(lib)?lib4\.dll]] [[mybin]] @@ -10,8 +10,8 @@ if(WIN32) [[myinclude]] [[myinclude/obj3\.h]] [[mylib]] - [[mylib/(lib)?lib1\.(dll\.a|lib)]] - [[mylib/(lib)?lib2\.(a|lib)]] + [[mylib/(lib)?lib1\.(dll\.a|lib|l)]] + [[mylib/(lib)?lib2\.(a|lib|l)]] ) elseif(MSYS) set(_check_files diff --git a/Tests/RunCMake/install/TARGETS-Defaults-all-check.cmake b/Tests/RunCMake/install/TARGETS-Defaults-all-check.cmake index 6e13b84..f357c1e 100644 --- a/Tests/RunCMake/install/TARGETS-Defaults-all-check.cmake +++ b/Tests/RunCMake/install/TARGETS-Defaults-all-check.cmake @@ -8,10 +8,10 @@ if(WIN32) [[include/obj2\.h]] [[include/obj3\.h]] [[lib]] - [[lib/(lib)?lib1\.(dll\.a|lib)]] - [[lib/(lib)?lib2\.(a|lib)]] + [[lib/(lib)?lib1\.(dll\.a|lib|l)]] + [[lib/(lib)?lib2\.(a|lib|l)]] [[lib3]] - [[lib3/(lib)?lib3\.(dll\.a|lib)]] + [[lib3/(lib)?lib3\.(dll\.a|lib|l)]] [[lib4]] [[lib4/(lib)?lib4\.dll]] ) diff --git a/Tests/RunCMake/install/TARGETS-OUTPUT_NAME-all-check.cmake b/Tests/RunCMake/install/TARGETS-OUTPUT_NAME-all-check.cmake index 91d5ef0..919ccf1 100644 --- a/Tests/RunCMake/install/TARGETS-OUTPUT_NAME-all-check.cmake +++ b/Tests/RunCMake/install/TARGETS-OUTPUT_NAME-all-check.cmake @@ -1,7 +1,7 @@ if(WIN32) set(test123 [[bin/test1out\.exe;bin/test2deb\.exe;bin/test3exc\.exe]]) set(libtest45 [[bin/libtest4\.dll;bin/libtest4\.dll\.a;bin/libtest5ar\.a]]) - set(test45 [[bin/test4\.dll;bin/test4\.lib;bin/test5ar\.lib]]) + set(test45 [[bin/test4\.dll;bin/test4\.(lib|l);bin/test5ar\.(lib|l)]]) check_installed("^bin;(${libtest45};${test123})|(${test123};${test45})\$") elseif(MSYS) diff --git a/Tests/RunCMake/install/TARGETS-Parts-all-check.cmake b/Tests/RunCMake/install/TARGETS-Parts-all-check.cmake index 6245839..8137e92 100644 --- a/Tests/RunCMake/install/TARGETS-Parts-all-check.cmake +++ b/Tests/RunCMake/install/TARGETS-Parts-all-check.cmake @@ -1 +1 @@ -check_installed([[^include;include/obj1\.h;lib;lib/(mylib\.lib|(lib|cyg)mylib\.a)$]]) +check_installed([[^include;include/obj1\.h;lib;lib/(mylib\.(lib|l)|(lib|cyg)mylib\.a)$]]) diff --git a/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-empty-all-check.cmake b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-empty-all-check.cmake index dafc2a4..38635c3 100644 --- a/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-empty-all-check.cmake +++ b/Tests/RunCMake/install/TARGETS-RUNTIME_DEPENDENCIES-empty-all-check.cmake @@ -1 +1 @@ -check_installed([[^static;static/(liblib\.a|lib\.lib)$]]) +check_installed([[^static;static/(liblib\.a|lib\.(lib|l))$]]) diff --git a/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/RunCMakeTest.cmake b/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/RunCMakeTest.cmake index 8e4745a..0f3a6b7 100644 --- a/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/RunCMakeTest.cmake +++ b/Tests/RunCMake/target_link_libraries-LINK_LIBRARY/RunCMakeTest.cmake @@ -31,7 +31,7 @@ if ((RunCMake_GENERATOR MATCHES "Makefiles|Ninja|Xcode" set(LINK_SHARED_LIBRARY_PREFIX ${CMAKE_SHARED_LIBRARY_PREFIX}) set(LINK_SHARED_LIBRARY_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX}) endif() - if (MINGW OR MSYS OR CYGWIN) + if (MINGW OR MSYS OR CYGWIN OR CMAKE_C_COMPILER_ID STREQUAL "OrangeC") set(LINK_EXTERN_LIBRARY_SUFFIX "") else() set(LINK_EXTERN_LIBRARY_SUFFIX "${CMAKE_IMPORT_LIBRARY_SUFFIX}") diff --git a/Tests/TestsWorkingDirectory/main.c b/Tests/TestsWorkingDirectory/main.c index ca72f21..f856339 100644 --- a/Tests/TestsWorkingDirectory/main.c +++ b/Tests/TestsWorkingDirectory/main.c @@ -5,7 +5,7 @@ #if defined(_WIN32) && \ (defined(_MSC_VER) || defined(__WATCOMC__) || defined(__BORLANDC__) || \ - defined(__MINGW32__)) + defined(__MINGW32__) || defined(__ORANGEC__)) # include <direct.h> # include <io.h> |