Ah! I think I know the problem. It might work fine if you use Visual
Studio IDE and not nmake. Can you try the attached patch please?

Utkarsh

On Wed, Feb 22, 2012 at 12:54 PM, Edwards, Paul
<[email protected]> wrote:
> I just modified ExecuteProtoC.cmake to print the variable ${OutDir}:
>
> message(STATUS "OUTDIR = " ${OutDir})
> execute_process(
>  COMMAND "D:/scratch/RollsRoyceParaView/${OutDir}/protoc" 
> "--cpp_out=dllexport_decl=VTK_PROTOBUF_EXPORT:D:/scratch/RollsRoyceParaView/ParaViewCore/ServerImplementation"
>  --proto_path 
> "D:/scratch/RollsRoyceParaViewSource/ParaViewCore/ServerImplementation/Resources"
>  
> "D:/scratch/RollsRoyceParaViewSource/ParaViewCore/ServerImplementation/Resources/vtkPVMessage.proto"
>  WORKING_DIRECTORY 
> "D:/scratch/RollsRoyceParaView/ParaViewCore/ServerImplementation"
> )
>
>
> And, it gives this:
>
> -- OUTDIR = .
>
> When running on the commandline (with the correct path) it generates the 
> files.
>
> Regards,
> Paul
>
>
>
>
>
> -----Original Message-----
> From: Utkarsh Ayachit [mailto:[email protected]]
> Sent: 22 February 2012 17:39
> To: Edwards, Paul
> Cc: [email protected]
> Subject: Re: [Paraview] Problem compiling master on windows
>
> Paul,
>
> vtkPVMessage should have been generated by protobuf. It must have
> failed to run or something. Try this, touch
> ParaViewCore/ServerImplementation/Resources/vtkPVMessage.proto and
> build. You should see something like:
>
>> Generating vtkPVMessage.pb.h, vtkPVMessage.pb.cc
> [ 84%] Built target protobuf_code_generation
>
> Check the errors if any.
>
> Utkarsh
>
>
> On Wed, Feb 22, 2012 at 11:57 AM, Edwards, Paul
> <[email protected]> wrote:
>> Doesn't anyone else get this problem?
>>
>>
>>
>> I noticed the build shows:
>>
>>
>>
>> Scanning dependencies of target protobuf_code_generation
>>
>> [ 77%] Generating vtkPVMessage.pb.h, vtkPVMessage.pb.cc
>>
>> [ 77%] Built target protobuf_code_generation
>>
>> [ 77%] generating modules
>>
>>
>>
>> But, I cannot find the vtkPVMessage.pb.h file that was supposedly generated.
>>
>>
>>
>> I'm not sure how to proceed here.  Any help would be appreciated.
>>
>>
>> Thanks,
>> Paul
>>
>>
>>
>> From: Edwards, Paul
>> Sent: 22 February 2012 10:05
>> To: [email protected]
>> Subject: Problem compiling master on windows
>>
>>
>>
>> I get the following error when building on win64 vista with Microsoft c++:
>>
>>
>>
>> [ 83%] Building CXX object
>> ParaViewCore/ServerImplementation/CMakeFiles/vtkPVServerImplementation.dir/vtkPVSessionBase.c
>>
>> xx.obj
>>
>> vtkPVSessionBase.cxx
>>
>> d:\scratch\paraviewsource\paraviewcore\serverimplementation\vtkSMMessage.h(30)
>> : fatal error C1083: Cannot ope
>>
>> n include file: 'vtkPVMessage.pb.h': No such file or directory
>>
>> NMAKE : fatal error U1077: 'C:\PROGRA~2\MICROS~1.0\VC\bin\amd64\cl.exe' :
>> return code '0x2'
>>
>> Stop.
>>
>> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio
>> 9.0\VC\BIN\amd64\nmake.exe"' : return code '
>>
>> 0x2'
>>
>> Stop.
>>
>> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio
>> 9.0\VC\BIN\amd64\nmake.exe"' : return code '
>>
>> 0x2'
>>
>> Stop.
>>
>>
>>
>> Does anyone else get this?  Or, can anyone suggest a fix?
>>
>>
>>
>> Thanks in advance,
>>
>> Paul
>>
>> The data contained in, or attached to, this e-mail, may contain confidential
>> information. If you have received it in error you should notify the sender
>> immediately by reply e-mail, delete the message from your system and contact
>> +44 (0) 1332 242424 (the Rolls-Royce IT Security Director) if you need
>> assistance. Please do not copy it for any purpose, or disclose its contents
>> to any other person.
>>
>> An e-mail response to this address may be subject to interception or
>> monitoring for operational reasons or for lawful business practices.
>>
>> (c) 2012 Rolls-Royce plc
>>
>> Registered office: 65 Buckingham Gate, London SW1E 6AT Company number:
>> 1003142. Registered in England.
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the ParaView Wiki at:
>> http://paraview.org/Wiki/ParaView
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.paraview.org/mailman/listinfo/paraview
>>
>
> The data contained in, or attached to, this e-mail, may contain confidential 
> information. If you have received it in error you should notify the sender 
> immediately by reply e-mail, delete the message from your system and contact 
> +44 (0) 1332 242424 (the Rolls-Royce IT Security Director) if you need 
> assistance. Please do not copy it for any purpose, or disclose its contents 
> to any other person.
>
> An e-mail response to this address may be subject to interception or 
> monitoring for operational reasons or for lawful business practices.
>
> (c) 2012 Rolls-Royce plc
>
> Registered office: 65 Buckingham Gate, London SW1E 6AT Company number: 
> 1003142. Registered in England.
>
diff --git a/CMake/ExecuteProtoC.cmake.in b/CMake/ExecuteProtoC.cmake.in
index 7c6e0f1..499239f 100644
--- a/CMake/ExecuteProtoC.cmake.in
+++ b/CMake/ExecuteProtoC.cmake.in
@@ -19,7 +19,14 @@ else(WIN32)
   set(ENV{LD_LIBRARY_PATH} ${ld_lib_path})
 endif(WIN32)
 
+if (OutDir)
+  set (protoc_location "@PROTOC_LOCATION@")
+else ()
+  set (protoc_location "@PROTOC_LOCATION_WITH_CFG@")
+endif()
+
+
 execute_process(
-  COMMAND "@PROTOC_LOCATION@" "--cpp_out=dllexport_decl=VTK_PROTOBUF_EXPORT:@CMAKE_CURRENT_BINARY_DIR@" --proto_path "@CMAKE_CURRENT_SOURCE_DIR@/Resources" "@CMAKE_CURRENT_SOURCE_DIR@/Resources/vtkPVMessage.proto"
+  COMMAND ${protoc_location} "--cpp_out=dllexport_decl=VTK_PROTOBUF_EXPORT:@CMAKE_CURRENT_BINARY_DIR@" --proto_path "@CMAKE_CURRENT_SOURCE_DIR@/Resources" "@CMAKE_CURRENT_SOURCE_DIR@/Resources/vtkPVMessage.proto"
   WORKING_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@"
 )
diff --git a/ParaViewCore/ServerImplementation/CMakeLists.txt b/ParaViewCore/ServerImplementation/CMakeLists.txt
index 8f85223..0fe5a39 100644
--- a/ParaViewCore/ServerImplementation/CMakeLists.txt
+++ b/ParaViewCore/ServerImplementation/CMakeLists.txt
@@ -87,11 +87,12 @@ INCLUDE_DIRECTORIES(
 # Compile protobuf resources.
 # run it from a script so we can set necessary paths.
 get_target_property(PROTOC_LOCATION protoc_compiler LOCATION)
+set (PROTOC_LOCATION_WITH_CFG)
 if (WIN32)
   get_filename_component(PROTOC_DIR ${PROTOC_LOCATION} PATH)
   get_filename_component(PROTOC_PDIR ${PROTOC_DIR} PATH)
   get_filename_component(PROTOC_FNAME ${PROTOC_LOCATION} NAME_WE)
-  set(PROTOC_LOCATION "${PROTOC_PDIR}/\${OutDir}/${PROTOC_FNAME}")
+  set(PROTOC_LOCATION_WITH_CFG "${PROTOC_PDIR}/\${OutDir}/${PROTOC_FNAME}")
 endif (WIN32)
 configure_file(${ParaView_CMAKE_DIR}/ExecuteProtoC.cmake.in
                ${CMAKE_CURRENT_BINARY_DIR}/ExecuteProtoC.cmake
@@ -100,7 +101,8 @@ add_custom_command(
     OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/vtkPVMessage.pb.h
            ${CMAKE_CURRENT_BINARY_DIR}/vtkPVMessage.pb.cc
     COMMAND ${CMAKE_COMMAND}
-    ARGS    -DOutDir=${CMAKE_CFG_INTDIR} -P ${CMAKE_CURRENT_BINARY_DIR}/ExecuteProtoC.cmake
+    ARGS    -DOutDir:PATH=${CMAKE_CFG_INTDIR}
+            -P ${CMAKE_CURRENT_BINARY_DIR}/ExecuteProtoC.cmake
     DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/Resources/vtkPVMessage.proto protoc_compiler ${ParaView_CMAKE_DIR}/ExecuteProtoC.cmake.in
     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to