visit-dav / visit

VisIt - Visualization and Data Analysis for Mesh-based Scientific Data
https://visit.llnl.gov
BSD 3-Clause "New" or "Revised" License
434 stars 112 forks source link

CMakeList.txt issue - qt wrong path - no error #5603

Open ARSanderson opened 3 years ago

ARSanderson commented 3 years ago

On OS X I recently blew away my build dir to start over and ran into an issues on the trunk

I had the wrong QT path in my machine.cmake file but no error was tossed. That is because I had the right path in my PATH environment variable (I use Qt Designer). As such CMakeList.txt is able to find:

-- moc location: /Users/allen/Projects/VisIt/Thirdparty/trunk/third_party/qt/5.14.2/i386-apple-darwin20_clang/bin/moc

When compiling though the wrong path is used.

make[2]: No rule to make target /Users/allen/Projects/VisIt/Thirdparty/trunk/third_party/qt/**5.10.1**/i386-apple-darwin20_clang/bin/moc', needed bytools/dev/clipeditor/moc_Viewer.cxx'. Stop. make[1]: [tools/dev/clipeditor/CMakeFiles/clipeditor.dir/all] Error 2

Note the version difference

As such, CMakeList.txt needs to look for the moc in the path specified in the machine.cmake path only.

To duplicate:

Put the the qt bin in your PATH Put the wrong qt path in you machine.cmake file:

SETUP_APP_VERSION(QT 5.14.2) VISIT_OPTION_DEFAULT(VISIT_QT_DIR ${VISITHOME}/qt/${QT_VERSION}/${VISITARCH})

Create a new build dir.

cmake ../src

it will complete without an error.

make

will get a No rule to make target error.

brugger1 commented 3 years ago

We can probably add logic to VISIT_OPTION_DEFAULT to check the path so that we don't have to modify all the find modules.