[CMake] Can multiple builds of VTK share one install directory?
Hello, I need to keep multiple builds of VTK with different configurations. Can I direct their installations to the same location (shown as below) so that whenever my vtk-based app needs to be linked against Build B I can just "cd Build_B_Dir & make install"? /-- Build A --\ VTK Source --- Build B --- installation \-- Build C --/ Perhaps this question should go to cmake forum --- Can "make install" from one build directory completely overwrites what previously came from another build directory corresponding to the same source? Weiguang -- ==== Weiguang Guan, Research Engineer RHPCS, McMaster University ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Can multiple builds of VTK share one install directory?
Thanks, David. I will keep a common installation directory as long as switching between different VTK builds doesn't cause any side effect. It's a good idea to manually clean up the installation directory before installing a build. But in my case, I want the common installlation directory to host not only VTK but other libs as well, and I must be very careful to remove ONLY vtk installation as there is no "make uninstall" for vtk. Weiguang On Thu, 5 Oct 2006, David Cole wrote: It can... but only because VTK's installation contains itself to its own make install tree. And it may be wise to add a clean of the install directory in between, too... i.e.: cd Common_Install_Dir rm -rf * cd Build_B_Dir make install That way, you guarantee that there's nothing left in the Common_Install_Dir from a previous install... HTH, David Weiguang Guan wrote: Hello, I need to keep multiple builds of VTK with different configurations. Can I direct their installations to the same location (shown as below) so that whenever my vtk-based app needs to be linked against Build B I can just "cd Build_B_Dir & make install"? /-- Build A --\ VTK Source ---Build B --- installation \--Build C --/ Perhaps this question should go to cmake forum --- Can "make install" from one build directory completely overwrites what previously came from another build directory corresponding to the same source? Weiguang ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] Re: [vtkusers] error: cmake + free optimizing compiler from .net framework SDK --- x86 conflicts with x64
Hi Mathieu, I am working directly on Windows XP rather than on Cygwin layer. I think this might be a cmake issue, because the error message box appears after I hit the "Configure" button of CMake, and the same error message pops up when configuring an ITK build with cmake. The error message seems coming from CMakeTestCCompiler.cmake, in which a simple c program (see below) is generated on the fly and compiled. #ifdef __cplusplus # error "The CMAKE_C_COMPILER is set to a C++ compiler" #endif #include #if defined(__CLASSIC_C__) int main(argc, argv) int argc; char* argv[]; #else int main(int argc, char* argv[]) #endif { printf("%s\\n", argv[0]); return argc-1;} I manually saved it into a file and got it compiled and linked. It worked fine. Can anyone explain why cmake thinks "it is not able to compile a simple test program"? -- ==== Weiguang Guan, Research Engineer RHPCS, McMaster University On Wed, 6 Dec 2006, Mathieu Malaterre wrote: Weiguang Guan wrote: Hi, I wanted to make use of the free C/C++ command line compiler that comes with microsoft's .net framework SDK 2.0 (platform SDK is installed as well). When I was using CMake to configure VTK5.0 on a x86 machine, I chose "NMake Makefile". But the C compiler failed to compile a simple test program, complaining "fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'X64'. I have no idea why it considered my computer to be x64, and it didn't help at all even if I changed /machine:x64 to /machine:/x86 in CMAKE_EXE_LINKER_FLAGS. Anybody had similar experience or had suggestion to this situation? Thanks. Weiguang, Here is the script I am using (bash+cygwin): export PATH='/cygdrive/c/Program Files/CMake 2.4/bin/:/cygdrive/c/Program Files/Microsoft Visual C++ Toolkit 2003/bin:/cygdrive/c/Program Files/Microsoft Platform SDK for Windows Server 2003 R2/Bin:/cygdrive/c/Program Files/Microsoft Platform SDK for Windows Server 2003 R2/Bin/win64':$PATH export LIB="C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib;C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib" export INCLUDE="C:\Program Files\Microsoft Visual C++ Toolkit 2003\include;C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include" Please check that you have something similar. Once this script is evaluated (source), run cmake in an empty directory (do not try to rerun in a old binary directory). HTH Mathieu ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] Re: [vtkusers] error: cmake + free optimizing compiler from .net framework SDK --- x86 conflicts with x64 (fwd)
Hi Mathieu, I am working directly on Windows XP rather than on Cygwin layer. I think this might be a cmake issue, because the error message box appears after I hit the "Configure" button of CMake, and the same error message pops up when configuring an ITK build with cmake. The error message seems coming from CMakeTestCCompiler.cmake, in which a simple c program (see below) is generated on the fly and compiled. #ifdef __cplusplus # error "The CMAKE_C_COMPILER is set to a C++ compiler" #endif #include #if defined(__CLASSIC_C__) int main(argc, argv) int argc; char* argv[]; #else int main(int argc, char* argv[]) #endif { printf("%s\\n", argv[0]); return argc-1;} I manually saved it into a file and got it compiled and linked. It worked fine. Can anyone explain why cmake thinks "it is not able to compile a simple test program"? -- ==== Weiguang Guan, Research Engineer RHPCS, McMaster University On Wed, 6 Dec 2006, Mathieu Malaterre wrote: Weiguang Guan wrote: Hi, I wanted to make use of the free C/C++ command line compiler that comes with microsoft's .net framework SDK 2.0 (platform SDK is installed as well). When I was using CMake to configure VTK5.0 on a x86 machine, I chose "NMake Makefile". But the C compiler failed to compile a simple test program, complaining "fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'X64'. I have no idea why it considered my computer to be x64, and it didn't help at all even if I changed /machine:x64 to /machine:/x86 in CMAKE_EXE_LINKER_FLAGS. Anybody had similar experience or had suggestion to this situation? Thanks. Weiguang, Here is the script I am using (bash+cygwin): export PATH='/cygdrive/c/Program Files/CMake 2.4/bin/:/cygdrive/c/Program Files/Microsoft Visual C++ Toolkit 2003/bin:/cygdrive/c/Program Files/Microsoft Platform SDK for Windows Server 2003 R2/Bin:/cygdrive/c/Program Files/Microsoft Platform SDK for Windows Server 2003 R2/Bin/win64':$PATH export LIB="C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib;C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib" export INCLUDE="C:\Program Files\Microsoft Visual C++ Toolkit 2003\include;C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include" Please check that you have something similar. Once this script is evaluated (source), run cmake in an empty directory (do not try to rerun in a old binary directory). HTH Mathieu ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Re: [vtkusers] error: cmake + free optimizing compiler from .net framework SDK --- x86 conflicts with x64
Hi Bill, Thank you so much. Here I confirm that your guess is right. I paste part of the output below. Is there a workaround? "C:\Program Files\CMake 2.4\bin\cmake.exe" -HZ:\visualization\software\buildWin\libraries\ thirdParty\VTK\CMakeFiles\CMakeTmp -BZ:\visualization\software\buildWin\libraries\thirdParty\VTK\C MakeFiles\CMakeTmp --check-build-system CMakeFiles\Makefile.cmake 0 -- Check for CL compiler version -- Check for CL compiler version - 1400 -- Check if this is a free VC compiler -- Check if this is a free VC compiler - no -- Check CL platform -- Check CL platform - 64 bit = (*** see this line ***) -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio 8/VC/bin/cl.exe -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio 8/VC/bin/cl.exe -- broke n My guess is that somehow the check size of void* failed to run correctly, and cmake thinks you are on a 64 bit machine. You can run cmake (not CMakeSetup) from the command line and use --debug-trycompile to get cmake to leave the try compile directories and not delete them. Also, you might want to try a simple hello world project instead of ITK or VTK. add_executable(foo foo.c) -Bill ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] Re: [vtkusers] error: cmake + free optimizing compiler from .net framework SDK --- x86 conflicts with x64
Hello all, With the help from Bill Hoffman, the problem has been solved. I'd like to share the solution with you. You may already find articles on the net, talking about free command-line c++ complier from within microsoft's .Net Framework SDK and win32 libs from within Platform SDK. I installed both and successfully compiled all the examples from the "OpenGL RedBook", and mistakenly thought I got the free comipler work. Then, error occurred when I tried to build VTK --- CMake failed to compile/link a simple c++ program during configuring VTK because libcpmt.lib could not be found. In fact, all the c++ standard libs are NOT shipped with either Framework SDK or Platform SDK. The right way is using Microsoft Visual C++ 2005 Express Edition, which is free of charge. You can download it from http://msdn.microsoft.com/vstudio/express/visualc/. You need to uninstall .NetFramework SDK if you already install it, and make sure you set environmental variables correctly --- path, include, lib ... Good luck! Weiguang -- ==== Weiguang Guan, Research Engineer RHPCS, McMaster University On Wed, 6 Dec 2006, Weiguang Guan wrote: Hi, I wanted to make use of the free C/C++ command line compiler that comes with microsoft's .net framework SDK 2.0 (platform SDK is installed as well). When I was using CMake to configure VTK5.0 on a x86 machine, I chose "NMake Makefile". But the C compiler failed to compile a simple test program, complaining "fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'X64'. I have no idea why it considered my computer to be x64, and it didn't help at all even if I changed /machine:x64 to /machine:/x86 in CMAKE_EXE_LINKER_FLAGS. Anybody had similar experience or had suggestion to this situation? Thanks. Weiguang ___ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake