Commit Graph

29 Commits

Author SHA1 Message Date
Brad King c736de7b28 Factor an <INCLUDES> placeholder out of <FLAGS> in rule variables
Teach the Makefile and Ninja generators to substitute for an <INCLUDES>
placeholder instead of putting -I in <FLAGS>.  Update our values for

  CMAKE_<LANG>_COMPILE_OBJECT,
  CMAKE_<LANG>_CREATE_ASSEMBLY_SOURCE, and
  CMAKE_<LANG>_CREATE_PREPROCESSED_SOURCE

to place <INCLUDES> just before <FLAGS>.
2015-07-13 10:49:46 -04:00
Brad King 6f94b03c97 Place <DEFINES> before <FLAGS> consistently across compilers
Update our values for

  CMAKE_<LANG>_COMPILE_OBJECT,
  CMAKE_<LANG>_CREATE_ASSEMBLY_SOURCE, and
  CMAKE_<LANG>_CREATE_PREPROCESSED_SOURCE

to place <DEFINES> before <FLAGS> consistently across supported
compilers.  We already do this for most compilers, so update the rest
for consistency.
2015-07-13 10:49:46 -04:00
J Decker 6b63942e45 Watcom: Drop symfile linker option
Cleanup of Windows-wcl386.cmake in commit v3.1.0-rc1~693^2 (Watcom:
Cleanup Windows-wcl386 configuration, 2014-04-01) also introduced use of
the 'symfile' link option but did not mention it in the commit message.

There is no way to set the symbol file name of a target, so it is better
to revert that change.  It is easy to run 'wstrip *' if the symbols need
to be stripped, but it is very difficult to get the right names for the
.sym files to install with debug/rel_with_deb_info configurations.
2014-11-03 08:46:48 -05:00
Jiri Malak cb9b1e13e4 Watcom: Use single quote for all file/path items in wlink command
Watcom Linker use single quote if necessary for quoting target name,
libraries names and libraries search path.  Object names were already
fixed.
2014-04-08 13:28:54 -04:00
Jiri Malak 1e22b23c81 Watcom: Cleanup Windows-wcl386 configuration
* Remove Watcom linker caseexact options already defined in system
  definition.
* Use win_dll system for SHARED_LIBRARY and SHARED_MODULE.
* Use explicit target definition -bt=.. option for proper initialization
  of compiler Windows environment (predefined macros)
* Reorganize compiler options to global options and configuration
  specific options
* Use option to optimize out stack checking code for release version
2014-04-02 09:14:50 -04:00
Jiri Malak 423009c17f Makefile: Generate single-quoted object lists for Watcom
Drop the CMAKE_NO_QUOTED_OBJECTS internal variable from the Makefile
generators.  The underlying problem is with the Watcom linker, not with
WMake.  The Watcom linker wants object files to be single-quoted.  Add
<LINK-RULE>_USE_WATCOM_QUOTE platform information variables to tell the
generators to use Watcom-style single quotes for object files on link
lines.

On Windows, Watcom uses the GetCommandLine API to get the original
command-line string and do custom parsing that expects single quotes.
On POSIX systems, Watcom approximates the original command line by
joining all argv[] entries separated by a single space.  Therefore we
need to double-quote the single-quoted arguments so that the shell does
not consume them and they are available for the parser to see.
2014-03-27 13:45:29 -04:00
Jiri Malak 5d9aa66c91 Watcom: Introduce OpenWatcom compiler id and fix compiler version
Distinguish "Open Watcom" from old "Watcom" by introducing a new
"OpenWatcom" compiler id.  The __WATCOMC__ format is "VVRP" for Watcom
and "VVRP + 1100" for Open Watcom.
2014-03-17 15:00:59 -04:00
Brad King ae215492cf Merge topic 'watcom-wlib-quoting'
5c5be193 Watcom: Fix static library name quoting for wlib
2014-03-03 10:06:21 -05:00
Jiri Malak 5c5be193cf Watcom: Fix static library name quoting for wlib
Use double-quotes instead of single-quotes around the static library
target name in 'wlib' invocations.
2014-02-28 13:34:59 -05:00
Brad King 00503d387e Watcom: Fix creation of DLLs without any exported symbols
Create each DLL import library by passing "option implib=..." to the
linker for its SHARED library.  This works even when there are no
symbols to be exported.  Leave the option out for MODULE libraries
because we do not need an import library for them.  For executables,
retain the separate invocation of wlib because we want an import
library only when the ENABLE_EXPORTS property is set, and in that
case the project should provide symbols.

Suggested-by: J Decker <d3ck0r@gmail.com>
2014-02-27 16:22:28 -05:00
Kitware Robot 9db3116226 Remove CMake-language block-end command arguments
Ancient versions of CMake required else(), endif(), and similar block
termination commands to have arguments matching the command starting the
block.  This is no longer the preferred style.

Run the following shell code:

for c in else endif endforeach endfunction endmacro endwhile; do
    echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
egrep -z -v 'Tests/CMakeTests/While-Endwhile-' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04:00
Kitware Robot 77543bde41 Convert CMake-language commands to lower case
Ancient CMake versions required upper-case commands.  Later command
names became case-insensitive.  Now the preferred style is lower-case.

Run the following shell code:

cmake --help-command-list |
grep -v "cmake version" |
while read c; do
    echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04:00
Brad King af42ae4f81 Watcom: Simplify compiler version detection (#11866)
Since commit c198730b (Detect Watcom compiler version with its id,
2011-12-07) the CMAKE_(C|CXX)_COMPILER_VERSION variables are set for the
Watcom compiler.  Use these in Windows-wcl386.cmake to set the old
WATCOM1* version variables.  This avoids using the old EXECUTE_PROCESS
command which failed due to extra quotes anyway.
2012-08-13 08:19:23 -04:00
Stephen Kelly 55d7aa4c44 Add platform variable for flags specific to shared libraries
Store in CMAKE_${lang}_COMPILE_OPTIONS_DLL flags from
CMAKE_SHARED_LIBRARY_${lang}_FLAGS that are truly exclusive to shared
libraries.
2012-06-12 15:38:48 -04:00
David Cole bd54141d5d Merge topic 'fix-11866-add-watcom-sys-libs'
ff59716 Watcom: Use correct args for execute_process call (#11866)
80769cd Add Watcom support to InstallRequiredSystemLibraries (#11866)
2011-08-02 15:11:35 -04:00
David Cole ff59716351 Watcom: Use correct args for execute_process call (#11866)
I botched an exec_program to execute_process translation on Friday.
RESULT_VARIABLE is the correct argument to execute_process.
2011-08-01 15:29:13 -04:00
David Cole a0974ae2e6 Watcom: Add -c flag to wlib calls (#12245)
Allows wlib to generate proper exports if two routines have
the same spelling, but different case (like Scale and scale).

Thanks to J Decker for the patch.
2011-07-29 13:52:23 -04:00
David Cole 80769cdd1e Add Watcom support to InstallRequiredSystemLibraries (#11866)
Also adds code to determine the version of the Watcom compiler
in use.

Thanks to J Decker for the patch.
2011-07-29 13:28:54 -04:00
Bill Hoffman 3b7da5396d Fix for bug 10388, fix various default flags. 2010-09-02 14:35:17 -04:00
Brad King 9622fe5e9a Watcom: Use LINK_FLAGS and STATIC_LIBRARY_FLAGS
Add the <LINK_FLAGS> rule variable in Watcom command lines.
2010-06-01 14:40:28 -04:00
Brad King 4f43c1f276 Singly-quote target names for Watcom linker
The Watcom tools do their own command-line parsing and do not accept
double-quotes.  Instead we single-quote the target output name when
invoking wlink and other Watcom tools.  This fixes support for spaces in
the target output directory path when it is not under the build tree.
2009-11-30 11:16:24 -05:00
Brad King 09af624dee BUG: Fix generation of Watcom link lines.
- Work-around bug in Watcom command line parsing for spaces in paths.
  - Add 'library' option before libraries specified by file path.
2008-01-23 13:30:55 -05:00
Brad King 8262ccfd4e ENH: Create COMPILE_DEFINITIONS property for targets and source files. Create <config>_COMPILE_DEFINITIONS property as per-configuration version. Add Preprocess test to test the feature. Document limitations on Xcode and VS6 generators. 2008-01-14 09:20:58 -05:00
Brad King e1260b8468 ENH: Enabled preprocessor make rules for Watcom. 2007-05-16 13:26:47 -04:00
Brad King 5a32aa5919 ENH: Added target property ENABLE_EXPORTS for executable targets. It enables the executables for linking by loadable modules that import symbols from the executable. This finishes the executable import library support mentioned in bug #4210. 2007-03-22 09:45:25 -04:00
Brad King 2f09a22411 BUG: Do not create import library for MODULEs. This is an incremental fix for bug#4210. 2007-03-10 07:49:47 -05:00
Brad King 08289893b8 ENH: Split CMAKE_STANDARD_LIBRARIES into per-language variables CMAKE_<lang>_STANDARD_LIBRARIES. This is needed to get programmable language support working with Visual Studio generators. It makes sense anyway. 2006-04-11 16:55:49 -04:00
Brad King 81677b3130 ENH: Generate import libraries for DLLs on Cygwin and MinGW. 2006-02-18 15:37:23 -05:00
Bill Hoffman 9891260a6d ENH: add support for watcom wmake and wcl386 2006-01-17 10:21:45 -05:00