Discussion:
CMake / Windows preproc defines
Cantor, Scott
2017-08-30 01:41:03 UTC
Permalink
Roger,

That "false alarm" build issue my colleague ran into seems to be connected to using the command line example you posted in the build instructions to generate the solution files.

I'm also getting the same result now, but if I generate the solution with the CMake-GUI front-end, it's defining WIN32 and _WINDOWS in the build, where as the command line generation doesn't, causing the error.

Does that ring a bell at all?

-- Scott


B�KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB��[��X��ܚX�KK[XZ[��Y]�][��X��ܚX�P\��\˘\X�K�ܙ�B��܈Y][ۘ[��[X[��K[
Roger Leigh
2017-08-30 06:45:13 UTC
Permalink
Post by Cantor, Scott
Roger,
That "false alarm" build issue my colleague ran into seems to be connected to using the command line example you posted in the build instructions to generate the solution files.
I'm also getting the same result now, but if I generate the solution with the CMake-GUI front-end, it's defining WIN32 and _WINDOWS in the build, where as the command line generation doesn't, causing the error.
Does that ring a bell at all?
I'm afraid not. With my testing, I simply ran

cmake -G "Visual Studio 15 2017 Win64" [options] /path/to/xerces

and opened the solution file. Did you use any additional options on the
command line? If you could let me know exactly what you ran, I can try
to reproduce and investigate.


Regards,
Roger

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-***@xerces.apache.org
For additional commands, e-mail: c-dev-***@xerces.apache.org
Cantor, Scott
2017-08-30 12:40:51 UTC
Permalink
Post by Roger Leigh
I'm afraid not. With my testing, I simply ran
cmake -G "Visual Studio 15 2017 Win64" [options] /path/to/xerces
and opened the solution file. Did you use any additional options on the
command line? If you could let me know exactly what you ran, I can try
to reproduce and investigate.
We're using this command:

cmake -G "Visual Studio 15 2017" -DCMAKE_CXX_FLAGS=/MP -DCMAKE_INSTALL_PREFIX=%ROOT_DIR%%XERCES_DIR%\install32\%MsVCVersion% ..\..

And now that I look at it, I bet it's the CMAKE_CXX_FLAGS override. It must fully replace a default value that it uses internally that's getting WIN32 defined. I'd bet a few beers that's it. Sorry for the noise. We'll look into the right way to supplement but not replace the macros.

-- Scott


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-***@xerces.apache.org
For additional commands, e-m
r***@codelibre.net
2017-08-30 14:27:21 UTC
Permalink
Post by Cantor, Scott
Post by Roger Leigh
I'm afraid not. With my testing, I simply ran
cmake -G "Visual Studio 15 2017 Win64" [options] /path/to/xerces
and opened the solution file. Did you use any additional options on the
command line? If you could let me know exactly what you ran, I can try
to reproduce and investigate.
cmake -G "Visual Studio 15 2017" -DCMAKE_CXX_FLAGS=/MP
-DCMAKE_INSTALL_PREFIX=%ROOT_DIR%%XERCES_DIR%\install32\%MsVCVersion%
..\..
And now that I look at it, I bet it's the CMAKE_CXX_FLAGS override. It
must fully replace a default value that it uses internally that's
getting WIN32 defined. I'd bet a few beers that's it. Sorry for the
noise. We'll look into the right way to supplement but not replace the
macros.
It does sound like the override is at fault. If you set with -D they go
into the cache, and they won't be modified later on.

Could you possibly try

set "CXXFLAGS=/MP"

in the shell before running CMake to see if this picks up and appends
the options, rather than overriding?



Regards,
Roger

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-***@xerces.apache.org
For additional commands, e-mail: c-dev-***@xerces.apache.org
Cantor, Scott
2017-08-30 14:36:29 UTC
Permalink
Post by r***@codelibre.net
Could you possibly try
set "CXXFLAGS=/MP"
in the shell before running CMake to see if this picks up and appends
the options, rather than overriding?
Yes, I'm trying that now and hoping that works like I would expect it would. Windows environment stuff can be fussy.

-- Scott


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-***@xerces.apache.org
For additional commands, e-mail: c-dev-***@xerces.apache.org
Cantor, Scott
2017-08-30 14:45:04 UTC
Permalink
Post by Cantor, Scott
Post by r***@codelibre.net
Could you possibly try
set "CXXFLAGS=/MP"
in the shell before running CMake to see if this picks up and appends
the options, rather than overriding?
Yes, I'm trying that now and hoping that works like I would expect it would.
Windows environment stuff can be fussy.
Worked fine, obvious in hindsight, just less common on Windows.

-- Scott


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-***@xerces.apache.org
For additional commands, e-mail: c-dev-***@xerces.apache.org

Loading...